mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
dashdemux: protect against failed header downloads
Avoids criticals when downloaded fragment is NULL
This commit is contained in:
parent
b99a91deed
commit
0a88daaf8e
1 changed files with 5 additions and 3 deletions
|
@ -1690,7 +1690,7 @@ static GstBuffer *
|
|||
gst_dash_demux_download_header_fragment (GstDashDemux * demux, guint stream_idx,
|
||||
gchar * path, gint64 range_start, gint64 range_end)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
GstBuffer *buffer = NULL;
|
||||
gchar *next_header_uri;
|
||||
GstFragment *fragment;
|
||||
|
||||
|
@ -1706,8 +1706,10 @@ gst_dash_demux_download_header_fragment (GstDashDemux * demux, guint stream_idx,
|
|||
fragment = gst_uri_downloader_fetch_uri_with_range (demux->downloader,
|
||||
next_header_uri, range_start, range_end);
|
||||
g_free (next_header_uri);
|
||||
buffer = gst_fragment_get_buffer (fragment);
|
||||
g_object_unref (fragment);
|
||||
if (fragment) {
|
||||
buffer = gst_fragment_get_buffer (fragment);
|
||||
g_object_unref (fragment);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue