libav: free protocol info in gst_ffmpeg_pipe_close

When the media is not seekable, we are calling gst_ffmpeg_pipe_close
which does free the info.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8070>
This commit is contained in:
Stéphane Cerveau 2024-12-04 16:27:54 +01:00 committed by GStreamer Marge Bot
parent f7da069496
commit 7d916c7377

View file

@ -332,10 +332,17 @@ int
gst_ffmpeg_pipe_close (AVIOContext * h)
{
GST_LOG ("Closing pipe");
GstProtocolInfo *info;
if (h == NULL)
return 0;
info = (GstProtocolInfo *) h->opaque;
if (info == NULL)
return 0;
g_free (info);
h->opaque = NULL;
av_freep (&h->buffer);
av_free (h);