summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;