mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
qtdemux: guard against timestamp calculation overflow in gap event loop
Could possibly cause an endless loop. Fixes #1400. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3085>
This commit is contained in:
parent
c2c20d2437
commit
d5577bbe5c
1 changed files with 1 additions and 0 deletions
|
@ -6395,6 +6395,7 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
|
||||||
/* gaps can only be sent after segment is activated (segment.stop is no longer -1) */
|
/* gaps can only be sent after segment is activated (segment.stop is no longer -1) */
|
||||||
while (GST_CLOCK_TIME_IS_VALID (stream->segment.stop) &&
|
while (GST_CLOCK_TIME_IS_VALID (stream->segment.stop) &&
|
||||||
GST_CLOCK_TIME_IS_VALID (stream->segment.position) &&
|
GST_CLOCK_TIME_IS_VALID (stream->segment.position) &&
|
||||||
|
stream->segment.position < (G_MAXUINT64 - gap_threshold) &&
|
||||||
stream->segment.position + gap_threshold < min_time) {
|
stream->segment.position + gap_threshold < min_time) {
|
||||||
GstEvent *gap =
|
GstEvent *gap =
|
||||||
gst_event_new_gap (stream->segment.position, gap_threshold);
|
gst_event_new_gap (stream->segment.position, gap_threshold);
|
||||||
|
|
Loading…
Reference in a new issue