avauddec: Close context when it was opened

This commit is contained in:
Sebastian Dröge 2012-12-11 15:14:10 +00:00
parent 06de84c747
commit 9945ae7adc

View file

@ -165,7 +165,7 @@ gst_ffmpegauddec_close (GstFFMpegAudDec * ffmpegdec)
gst_caps_replace (&ffmpegdec->last_caps, NULL);
if (ffmpegdec->context->priv_data)
if (ffmpegdec->opened)
gst_ffmpeg_avcodec_close (ffmpegdec->context);
ffmpegdec->opened = FALSE;