asfdemux: fix latency calculations
We need to check for -1 as an invalid timestamp, not 1.
This commit is contained in:
parent
af3ab2ae94
commit
8de1502c9b
@ -3549,15 +3549,15 @@ gst_asf_demux_handle_src_query (GstPad * pad, GstQuery * query)
|
|||||||
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
GST_TIME_ARGS (min), GST_TIME_ARGS (max));
|
||||||
|
|
||||||
GST_OBJECT_LOCK (demux);
|
GST_OBJECT_LOCK (demux);
|
||||||
if (min != 1)
|
if (min != -1)
|
||||||
min += demux->latency;
|
min += demux->latency;
|
||||||
if (max != 1)
|
if (max != -1)
|
||||||
max += demux->latency;
|
max += demux->latency;
|
||||||
GST_OBJECT_UNLOCK (demux);
|
GST_OBJECT_UNLOCK (demux);
|
||||||
|
|
||||||
gst_query_set_latency (query, live, min, max);
|
gst_query_set_latency (query, live, min, max);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
res = gst_pad_query_default (pad, query);
|
res = gst_pad_query_default (pad, query);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user