[0.11] gst-ffmpeg: ffdec: Only set get_buffer() function for video

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Jan 18 01:22:45 PST 2012


Module: gst-ffmpeg
Branch: 0.11
Commit: 99d47920144f08f7efd0ca03ec5ab583046c496d
URL:    http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=99d47920144f08f7efd0ca03ec5ab583046c496d

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Jan 18 10:05:09 2012 +0100

ffdec: Only set get_buffer() function for video

Fixes bug #666435.

---

 ext/ffmpeg/gstffmpegdec.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index db02a69..fa2e2f4 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -766,9 +766,11 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
   }
 
   /* set buffer functions */
-  ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
-  ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
-  ffmpegdec->context->draw_horiz_band = NULL;
+  if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
+    ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
+    ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
+    ffmpegdec->context->draw_horiz_band = NULL;
+  }
 
   /* default is to let format decide if it needs a parser */
   ffmpegdec->turnoff_parser = FALSE;



More information about the gstreamer-commits mailing list