mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 16:05:47 +00:00
dashdemux: Handle case without an initialization segment
If no initialization segment is defined, then don't print a critical or a warning, just ignore it. https://bugzilla.gnome.org/show_bug.cgi?id=701961
This commit is contained in:
parent
4c89fab390
commit
3f26bb9154
2 changed files with 20 additions and 14 deletions
ext/dash
|
@ -1728,18 +1728,24 @@ gst_dash_demux_get_next_header (GstDashDemux * demux, guint stream_idx)
|
||||||
initializationURL, range_start, range_end);
|
initializationURL, range_start, range_end);
|
||||||
|
|
||||||
/* check if we have an index */
|
/* check if we have an index */
|
||||||
if (gst_mpd_client_get_next_header_index (demux->client, &initializationURL,
|
if (header_buffer
|
||||||
stream_idx, &range_start, &range_end)) {
|
&& gst_mpd_client_get_next_header_index (demux->client,
|
||||||
GST_INFO_OBJECT (demux, "Fetching index %s %" G_GINT64_FORMAT "-%"
|
&initializationURL, stream_idx, &range_start, &range_end)) {
|
||||||
G_GINT64_FORMAT, initializationURL, range_start, range_end);
|
GST_INFO_OBJECT (demux,
|
||||||
index_buffer = gst_dash_demux_download_header_fragment (demux, stream_idx,
|
"Fetching index %s %" G_GINT64_FORMAT "-%" G_GINT64_FORMAT,
|
||||||
|
initializationURL, range_start, range_end);
|
||||||
|
index_buffer =
|
||||||
|
gst_dash_demux_download_header_fragment (demux, stream_idx,
|
||||||
initializationURL, range_start, range_end);
|
initializationURL, range_start, range_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index_buffer && header_buffer) {
|
if (header_buffer == NULL) {
|
||||||
|
GST_WARNING_OBJECT (demux, "Unable to fetch header");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index_buffer) {
|
||||||
header_buffer = gst_buffer_append (header_buffer, index_buffer);
|
header_buffer = gst_buffer_append (header_buffer, index_buffer);
|
||||||
} else if (index_buffer) {
|
|
||||||
gst_buffer_unref (index_buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return header_buffer;
|
return header_buffer;
|
||||||
|
@ -1975,9 +1981,7 @@ gst_dash_demux_get_next_fragment (GstDashDemux * demux)
|
||||||
if (selected_stream->need_header) {
|
if (selected_stream->need_header) {
|
||||||
/* We need to fetch a new header */
|
/* We need to fetch a new header */
|
||||||
if ((header_buffer =
|
if ((header_buffer =
|
||||||
gst_dash_demux_get_next_header (demux, stream_idx)) == NULL) {
|
gst_dash_demux_get_next_header (demux, stream_idx)) != NULL) {
|
||||||
GST_WARNING_OBJECT (demux, "Unable to fetch header");
|
|
||||||
} else {
|
|
||||||
buffer = gst_buffer_append (header_buffer, buffer);
|
buffer = gst_buffer_append (header_buffer, buffer);
|
||||||
}
|
}
|
||||||
selected_stream->need_header = FALSE;
|
selected_stream->need_header = FALSE;
|
||||||
|
|
|
@ -3437,9 +3437,11 @@ gst_mpd_client_get_next_header (GstMpdClient * client, gchar ** uri,
|
||||||
&& stream_period->period->SegmentTemplate->initialization) {
|
&& stream_period->period->SegmentTemplate->initialization) {
|
||||||
initialization = stream_period->period->SegmentTemplate->initialization;
|
initialization = stream_period->period->SegmentTemplate->initialization;
|
||||||
}
|
}
|
||||||
*uri = gst_mpdparser_build_URL_from_template (initialization,
|
if (initialization) {
|
||||||
stream->cur_representation->id, 0,
|
*uri = gst_mpdparser_build_URL_from_template (initialization,
|
||||||
stream->cur_representation->bandwidth, 0);
|
stream->cur_representation->id, 0,
|
||||||
|
stream->cur_representation->bandwidth, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
GST_MPD_CLIENT_UNLOCK (client);
|
GST_MPD_CLIENT_UNLOCK (client);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue