avviddec: Initialise opaque from the start

https://bugzilla.gnome.org/show_bug.cgi?id=693581
This commit is contained in:
Olivier Crête 2013-02-20 20:50:15 -05:00 committed by Edward Hervey
parent 9b2577ea2b
commit 2556cb325a

View file

@ -250,6 +250,7 @@ gst_ffmpegviddec_init (GstFFMpegVidDec * ffmpegdec)
/* some ffmpeg data */
ffmpegdec->context = avcodec_alloc_context3 (klass->in_plugin);
ffmpegdec->context->opaque = ffmpegdec;
ffmpegdec->picture = avcodec_alloc_frame ();
ffmpegdec->opened = FALSE;
ffmpegdec->skip_frame = ffmpegdec->lowres = 0;
@ -1057,8 +1058,6 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
*ret = GST_FLOW_OK;
ffmpegdec->context->opaque = ffmpegdec;
/* in case we skip frames */
ffmpegdec->picture->pict_type = -1;