From c5f8587e8daa66d11fbf730b03e929ca95e3ede4 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 16 Jul 2024 20:49:13 +0900 Subject: [PATCH] avauddec: Fix crash on stop() GstFFMpegAudDec.context can be nullptr if decoder got closed without opening new context. Note that we don't need to clear AVCodecContext.extradata there since avcodec_free_context() will do clear the data if needed. Part-of: --- subprojects/gst-libav/ext/libav/gstavauddec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/subprojects/gst-libav/ext/libav/gstavauddec.c b/subprojects/gst-libav/ext/libav/gstavauddec.c index 2279e690ee..9a7640f84f 100644 --- a/subprojects/gst-libav/ext/libav/gstavauddec.c +++ b/subprojects/gst-libav/ext/libav/gstavauddec.c @@ -171,7 +171,6 @@ gst_ffmpegauddec_close (GstFFMpegAudDec * ffmpegdec) GST_LOG_OBJECT (ffmpegdec, "closing libav codec"); gst_caps_replace (&ffmpegdec->last_caps, NULL); - av_freep (&ffmpegdec->context->extradata); avcodec_free_context (&ffmpegdec->context); }