mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 08:25:33 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7184>
This commit is contained in:
parent
bef77722aa
commit
c5f8587e8d
1 changed files with 0 additions and 1 deletions
|
@ -171,7 +171,6 @@ gst_ffmpegauddec_close (GstFFMpegAudDec * ffmpegdec)
|
||||||
GST_LOG_OBJECT (ffmpegdec, "closing libav codec");
|
GST_LOG_OBJECT (ffmpegdec, "closing libav codec");
|
||||||
|
|
||||||
gst_caps_replace (&ffmpegdec->last_caps, NULL);
|
gst_caps_replace (&ffmpegdec->last_caps, NULL);
|
||||||
av_freep (&ffmpegdec->context->extradata);
|
|
||||||
avcodec_free_context (&ffmpegdec->context);
|
avcodec_free_context (&ffmpegdec->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue