From: gb Date: Thu, 13 May 2010 21:27:43 +0000 (+0000) Subject: Fix a crash in the FFmpeg decoder on close. X-Git-Tag: 1.19.3~503^2~3400 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5df97625ed849f711c1dbbdeb0570cd24076d01;p=platform%2Fupstream%2Fgstreamer.git Fix a crash in the FFmpeg decoder on close. --- diff --git a/NEWS b/NEWS index 9be5f4c..fe04ed9 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Copyright (C) 2010 Splitted-Desktop Systems Version 0.2.2 - DD.May.2010 * Fix packaging dependencies +* Fix a crash in the FFmpeg decoder on close * Fix OpenGL texture internal format (Clutter) * Fix foreign window size for embedding (Totem) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c index a866390..d7ec1ae 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c @@ -295,7 +295,8 @@ gst_vaapi_decoder_ffmpeg_close(GstVaapiDecoderFfmpeg *ffdecoder) GstVaapiDecoderFfmpegPrivate * const priv = ffdecoder->priv; if (priv->avctx) { - avcodec_close(priv->avctx); + if (priv->is_opened) + avcodec_close(priv->avctx); av_freep(&priv->avctx->extradata); priv->avctx->extradata_size = 0; }