ext/ffmpeg/gstffmpegdec.c: Fix check for memory to free.

Original commit message from CVS:
reviewed by: Edward Hervey  <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_finalize):
Fix check for memory to free.
Fixes #560644
This commit is contained in:
Edward Hervey 2008-12-03 17:43:45 +00:00
parent dcdac9e007
commit 4540e7d752
3 changed files with 17 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2008-12-03 Yotam Shtossel <sh.yotam@gmail.com>
reviewed by: Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_finalize):
Fix check for memory to free.
Fixes #560644
2008-11-27 Jan Schmidt <jan.schmidt@sun.com>
* configure.ac:

2
common

@ -1 +1 @@
Subproject commit e4b2fe44724e1c1a6e816ae4fbbae43d7f68f1ef
Subproject commit 9a486164b87586f7b936a55b1ee56a14cd4e2c73

View file

@ -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);
}