dashdemux: Also allow key-unit only mode if (some) sample flags are given by trex but we can still find sync frames

https://bugzilla.gnome.org/show_bug.cgi?id=741104
This commit is contained in:
Sebastian Dröge 2016-07-29 11:54:21 +03:00
parent 47ef88f20e
commit b936c00f51

View file

@ -2067,6 +2067,7 @@ gst_dash_demux_find_sync_samples (GstAdaptiveDemux * demux,
guint i;
guint32 track_id = 0;
guint64 prev_traf_end;
gboolean trex_sample_flags = FALSE;
if (!dash_stream->moof)
return FALSE;
@ -2136,11 +2137,8 @@ gst_dash_demux_find_sync_samples (GstAdaptiveDemux * demux,
tfhd.flags & GST_TFHD_FLAGS_DEFAULT_SAMPLE_FLAGS_PRESENT) {
sample_flags = traf->tfhd.default_sample_flags;
} else {
GST_FIXME_OBJECT (stream->pad,
"Sample flags given by trex - can't download only keyframes");
g_array_free (dash_stream->moof_sync_samples, TRUE);
dash_stream->moof_sync_samples = NULL;
return FALSE;
trex_sample_flags = TRUE;
continue;
}
#if 0
@ -2186,6 +2184,19 @@ gst_dash_demux_find_sync_samples (GstAdaptiveDemux * demux,
prev_traf_end = prev_trun_end;
}
if (trex_sample_flags) {
if (dash_stream->moof_sync_samples->len > 0) {
GST_LOG_OBJECT (stream->pad,
"Some sample flags given by trex but still found sync samples");
} else {
GST_FIXME_OBJECT (stream->pad,
"Sample flags given by trex - can't download only keyframes");
g_array_free (dash_stream->moof_sync_samples, TRUE);
dash_stream->moof_sync_samples = NULL;
return FALSE;
}
}
return TRUE;
}