diff --git a/ChangeLog b/ChangeLog index 70c2edfe4f..1a7607c828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-03 Yotam Shtossel + + reviewed by: Edward Hervey + + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_finalize): + Fix check for memory to free. + Fixes #560644 + 2008-11-27 Jan Schmidt * configure.ac: diff --git a/common b/common index e4b2fe4472..9a486164b8 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit e4b2fe44724e1c1a6e816ae4fbbae43d7f68f1ef +Subproject commit 9a486164b87586f7b936a55b1ee56a14cd4e2c73 diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 54889902f3..a70136b843 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -370,13 +370,16 @@ gst_ffmpegdec_finalize (GObject * object) { GstFFMpegDec *ffmpegdec = (GstFFMpegDec *) object; - if (ffmpegdec->opened) { - - /* clean up remaining allocated data */ + if (ffmpegdec->context != NULL) { av_free (ffmpegdec->context); - av_free (ffmpegdec->picture); - + ffmpegdec->context = NULL; } + + if (ffmpegdec->picture != NULL) { + av_free (ffmpegdec->picture); + ffmpegdec->picture = NULL; + } + G_OBJECT_CLASS (parent_class)->finalize (object); }