mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
audiopanorama: simplify get_unit_size
This commit is contained in:
parent
fb63372713
commit
3b6de2bacd
1 changed files with 1 additions and 4 deletions
|
@ -302,16 +302,13 @@ gst_audio_panorama_get_unit_size (GstBaseTransform * base, GstCaps * caps,
|
||||||
gsize * size)
|
gsize * size)
|
||||||
{
|
{
|
||||||
GstAudioInfo info;
|
GstAudioInfo info;
|
||||||
gint width, channels;
|
|
||||||
|
|
||||||
g_assert (size);
|
g_assert (size);
|
||||||
|
|
||||||
if (!gst_audio_info_from_caps (&info, caps))
|
if (!gst_audio_info_from_caps (&info, caps))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
width = GST_AUDIO_INFO_WIDTH (&info);
|
*size = GST_AUDIO_INFO_BPF (&info);
|
||||||
channels = GST_AUDIO_INFO_CHANNELS (&info);
|
|
||||||
*size = width * channels / 8;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue