[gst-cvs] gst-ffmpeg: ffdec: fixup QCELP to always be mono

Wim Taymans wtay at kemper.freedesktop.org
Thu Feb 4 08:11:53 PST 2010


Module: gst-ffmpeg
Branch: master
Commit: 430b8eb74d72905b4939378539f0f4588744e9d7
URL:    http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=430b8eb74d72905b4939378539f0f4588744e9d7

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Thu Feb  4 17:08:41 2010 +0100

ffdec: fixup QCELP to always be mono

Make QCELP always mono, even if the caps tell us a different layout.

---

 ext/ffmpeg/gstffmpegcodecmap.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index fb71084..f9e7d62 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -2385,6 +2385,16 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
     default:
       break;
   }
+
+  /* fixup of default settings */
+  switch (codec_id) {
+    case CODEC_ID_QCELP:
+      /* QCELP is always mono, no matter what the caps say */
+      context->channels = 1;
+      break;
+    default:
+      break;
+  }
 }
 
 /* _formatid_to_caps () is meant for muxers/demuxers, it





More information about the Gstreamer-commits mailing list