avviddec: Free frame before the codec is freed

Who knows, maybe freeing the frame calls cleanup inside the codec.
This commit is contained in:
Sebastian Dröge 2015-06-27 20:25:18 +02:00
parent 982f5262d4
commit 3d9816ce7f

View file

@ -277,14 +277,14 @@ gst_ffmpegviddec_finalize (GObject * object)
{
GstFFMpegVidDec *ffmpegdec = (GstFFMpegVidDec *) object;
av_frame_free (&ffmpegdec->picture);
if (ffmpegdec->context != NULL) {
gst_ffmpeg_avcodec_close (ffmpegdec->context);
av_free (ffmpegdec->context);
ffmpegdec->context = NULL;
}
av_frame_free (&ffmpegdec->picture);
G_OBJECT_CLASS (parent_class)->finalize (object);
}