From 6a3b05dbca32462b20314ee9ef93d1f552263cff Mon Sep 17 00:00:00 2001 From: gb Date: Thu, 29 Apr 2010 09:40:38 +0000 Subject: [PATCH] Fix destructor, av_parser_close() does destroy the struct already, unliker avcodec_close()... --- gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c index 6ab342c53d..365cbde774 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c @@ -248,8 +248,10 @@ gst_vaapi_decoder_ffmpeg_close(GstVaapiDecoderFfmpeg *ffdecoder) avcodec_close(priv->avctx); } - if (priv->pctx) + if (priv->pctx) { av_parser_close(priv->pctx); + priv->pctx = NULL; + } } static gboolean @@ -305,7 +307,6 @@ gst_vaapi_decoder_ffmpeg_destroy(GstVaapiDecoderFfmpeg *ffdecoder) } av_freep(&priv->avctx); - av_freep(&priv->pctx); av_freep(&priv->frame); }