mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
tsdemux: Don't query duration if program isn't active
This commit is contained in:
parent
0178354e6e
commit
4ae9a9dc91
1 changed files with 5 additions and 0 deletions
|
@ -496,6 +496,11 @@ gst_ts_demux_get_duration (GstTSDemux * demux, GstClockTime * dur)
|
|||
gboolean res = FALSE;
|
||||
gint64 val;
|
||||
|
||||
if (!demux->program) {
|
||||
GST_DEBUG_OBJECT (demux, "No active program yet, can't provide duration");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Get total size in bytes */
|
||||
if (gst_pad_peer_query_duration (base->sinkpad, GST_FORMAT_BYTES, &val)) {
|
||||
/* Convert it to duration */
|
||||
|
|
Loading…
Reference in a new issue