mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
uridecodebin: Only enable progressive downloading if the upstream duration in bytes is known
Otherwise we might try to enable it for live streams, where this would cause playback to fail completely. Fixes bug #628028.
This commit is contained in:
parent
b899bca94d
commit
c591b98864
1 changed files with 8 additions and 0 deletions
|
@ -1477,6 +1477,14 @@ type_found (GstElement * typefind, guint probability,
|
||||||
|
|
||||||
/* remember if we need download buffering */
|
/* remember if we need download buffering */
|
||||||
decoder->is_download = IS_DOWNLOAD_MEDIA (media_type) && decoder->download;
|
decoder->is_download = IS_DOWNLOAD_MEDIA (media_type) && decoder->download;
|
||||||
|
/* only enable download buffering if the upstream duration is known */
|
||||||
|
if (decoder->is_download) {
|
||||||
|
GstFormat fmt = GST_FORMAT_BYTES;
|
||||||
|
gint64 dur;
|
||||||
|
|
||||||
|
decoder->is_download = (gst_element_query_duration (typefind, &fmt, &dur)
|
||||||
|
&& fmt == GST_FORMAT_BYTES && dur != -1);
|
||||||
|
}
|
||||||
|
|
||||||
dec_elem = make_decoder (decoder);
|
dec_elem = make_decoder (decoder);
|
||||||
if (!dec_elem)
|
if (!dec_elem)
|
||||||
|
|
Loading…
Reference in a new issue