mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
codecmap: don't set channel-positions for common mono and stereo cases
This commit is contained in:
parent
2af8b4dd15
commit
595de04316
1 changed files with 10 additions and 2 deletions
|
@ -160,8 +160,16 @@ gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
|
|||
}
|
||||
}
|
||||
|
||||
if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER)
|
||||
pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
|
||||
if (nchannels == 1 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER) {
|
||||
GST_DEBUG ("mono common case; won't set channel positions");
|
||||
g_free (pos);
|
||||
pos = NULL;
|
||||
} else if (nchannels == 2 && pos[0] == GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT
|
||||
&& pos[1] == GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT) {
|
||||
GST_DEBUG ("stereo common case; won't set channel positions");
|
||||
g_free (pos);
|
||||
pos = NULL;
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue