mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: If no channel layout is provided don't set a NONE layout in the case of >2 channels b...
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_channel_layout_to_gst): If no channel layout is provided don't set a NONE layout in the case of >2 channels but instead let audioconvert add some default layout.
This commit is contained in:
parent
616c0eb07f
commit
923580b14f
2 changed files with 13 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-12-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_channel_layout_to_gst):
|
||||||
|
If no channel layout is provided don't set a NONE layout in the
|
||||||
|
case of >2 channels but instead let audioconvert add some default
|
||||||
|
layout.
|
||||||
|
|
||||||
2008-12-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-12-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* ext/ffmpeg/Makefile.am:
|
* ext/ffmpeg/Makefile.am:
|
||||||
|
|
|
@ -139,8 +139,9 @@ gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
|
||||||
none_layout = TRUE;
|
none_layout = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_audio_check_channel_positions (pos, nchannels)) {
|
if (!none_layout && !gst_audio_check_channel_positions (pos, nchannels)) {
|
||||||
GST_ERROR ("Invalid channel layout - assuming NONE layout");
|
GST_ERROR ("Invalid channel layout %" G_GUINT64_FORMAT
|
||||||
|
" - assuming NONE layout", channel_layout);
|
||||||
none_layout = TRUE;
|
none_layout = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,6 +151,9 @@ gst_ff_channel_layout_to_gst (guint64 channel_layout, guint channels)
|
||||||
} else if (nchannels == 2) {
|
} else if (nchannels == 2) {
|
||||||
pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
|
pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
|
||||||
pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
|
pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
|
||||||
|
} else if (channel_layout == 0) {
|
||||||
|
g_free (pos);
|
||||||
|
pos = NULL;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < nchannels; i++)
|
for (i = 0; i < nchannels; i++)
|
||||||
pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
|
pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
|
||||||
|
|
Loading…
Reference in a new issue