Improve previous fix.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Thu, 13 May 2010 21:39:58 +0000 (21:39 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:46 +0000 (12:55 +0200)
gst-libs/gst/vaapi/gstvaapidecoder_ffmpeg.c

index d7ec1ae..79fa94f 100644 (file)
@@ -295,8 +295,10 @@ gst_vaapi_decoder_ffmpeg_close(GstVaapiDecoderFfmpeg *ffdecoder)
     GstVaapiDecoderFfmpegPrivate * const priv = ffdecoder->priv;
 
     if (priv->avctx) {
-        if (priv->is_opened)
+        if (priv->is_opened) {
             avcodec_close(priv->avctx);
+            priv->is_opened = FALSE;
+        }
         av_freep(&priv->avctx->extradata);
         priv->avctx->extradata_size = 0;
     }