mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
hlsdemux: Fix memory leak caused by double buffer map
https://bugzilla.gnome.org/show_bug.cgi?id=789999
This commit is contained in:
parent
ec32124cf0
commit
0ef2a41d84
1 changed files with 3 additions and 5 deletions
|
@ -802,19 +802,17 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
|
|||
{
|
||||
GstHLSDemuxStream *hls_stream = GST_HLS_DEMUX_STREAM_CAST (stream); // FIXME: pass HlsStream into function
|
||||
GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux);
|
||||
GstMapInfo info;
|
||||
GstClockTime first_pcr, last_pcr;
|
||||
GstTagList *tags;
|
||||
|
||||
if (buffer == NULL)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
||||
|
||||
if (G_UNLIKELY (hls_stream->do_typefind)) {
|
||||
GstCaps *caps = NULL;
|
||||
guint buffer_size;
|
||||
GstTypeFindProbability prob = GST_TYPE_FIND_NONE;
|
||||
GstMapInfo info;
|
||||
|
||||
if (hls_stream->pending_typefind_buffer)
|
||||
buffer = gst_buffer_append (hls_stream->pending_typefind_buffer, buffer);
|
||||
|
@ -859,11 +857,11 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
|
|||
gst_adaptive_demux_stream_set_caps (stream, caps);
|
||||
|
||||
hls_stream->do_typefind = FALSE;
|
||||
|
||||
gst_buffer_unmap (buffer, &info);
|
||||
}
|
||||
g_assert (hls_stream->pending_typefind_buffer == NULL);
|
||||
|
||||
gst_buffer_unmap (buffer, &info);
|
||||
|
||||
// Accumulate this buffer
|
||||
if (hls_stream->pending_pcr_buffer) {
|
||||
buffer = gst_buffer_append (hls_stream->pending_pcr_buffer, buffer);
|
||||
|
|
Loading…
Reference in a new issue