summaryrefslogtreecommitdiff
path: root/ext/libav/gstavviddec.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-06-27 20:25:18 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-06-28 12:41:55 +0200
commit3d9816ce7f43ebafb40aedc0b643160e2b6a0973 (patch)
treea08dda020a90006ebdf756c7080c547c263ca39e /ext/libav/gstavviddec.c
parent982f5262d44ac42c5a2f0ed07446875424900a76 (diff)
downloadgst-libav-3d9816ce7f43ebafb40aedc0b643160e2b6a0973.tar.gz
avviddec: Free frame before the codec is freed
Who knows, maybe freeing the frame calls cleanup inside the codec.
Diffstat (limited to 'ext/libav/gstavviddec.c')
-rw-r--r--ext/libav/gstavviddec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index 79533d5..22184f8 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -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);
}