summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-01-18 10:05:09 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-01-18 10:11:49 +0100
commit99d47920144f08f7efd0ca03ec5ab583046c496d (patch)
tree295cc261209f5dc97e3f4bc76c34903a64c28013
parentc84802ffef3ee9248ffe4f757a8f5bdf455faef2 (diff)
ffdec: Only set get_buffer() function for video
Fixes bug #666435.
-rw-r--r--ext/ffmpeg/gstffmpegdec.c8
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;