mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
dashdemux: fix memory leak in gst_dash_demux_update_manifest_data
new_client local variable was not freed in case of errors. Also, the buffer is not unmapped. https://bugzilla.gnome.org/show_bug.cgi?id=760120
This commit is contained in:
parent
9ccd541980
commit
3191051828
1 changed files with 8 additions and 0 deletions
|
@ -1427,17 +1427,23 @@ gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux,
|
||||||
if (period_id) {
|
if (period_id) {
|
||||||
if (!gst_mpd_client_set_period_id (new_client, period_id)) {
|
if (!gst_mpd_client_set_period_id (new_client, period_id)) {
|
||||||
GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
|
GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
|
||||||
|
gst_mpd_client_free (new_client);
|
||||||
|
gst_buffer_unmap (buffer, &mapinfo);
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!gst_mpd_client_set_period_index (new_client, period_idx)) {
|
if (!gst_mpd_client_set_period_index (new_client, period_idx)) {
|
||||||
GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
|
GST_DEBUG_OBJECT (demux, "Error setting up the updated manifest file");
|
||||||
|
gst_mpd_client_free (new_client);
|
||||||
|
gst_buffer_unmap (buffer, &mapinfo);
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_dash_demux_setup_mpdparser_streams (dashdemux, new_client)) {
|
if (!gst_dash_demux_setup_mpdparser_streams (dashdemux, new_client)) {
|
||||||
GST_ERROR_OBJECT (demux, "Failed to setup streams on manifest " "update");
|
GST_ERROR_OBJECT (demux, "Failed to setup streams on manifest " "update");
|
||||||
|
gst_mpd_client_free (new_client);
|
||||||
|
gst_buffer_unmap (buffer, &mapinfo);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1453,6 +1459,8 @@ gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux,
|
||||||
GST_DEBUG_OBJECT (demux,
|
GST_DEBUG_OBJECT (demux,
|
||||||
"Stream of index %d is missing from manifest update",
|
"Stream of index %d is missing from manifest update",
|
||||||
demux_stream->index);
|
demux_stream->index);
|
||||||
|
gst_mpd_client_free (new_client);
|
||||||
|
gst_buffer_unmap (buffer, &mapinfo);
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue