diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2022-09-27 13:56:54 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-09-27 13:07:15 +0000 |
commit | 02a8f9973b6c7d4c3c53dfe86d25e262705f92fa (patch) | |
tree | c9e8b64b74ef12f4e9e4008235cab38ea620f852 | |
parent | 3c2c4bbe2c42e57dfe3ab6df2ca53ad600315364 (diff) |
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/3084>
-rw-r--r-- | subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index 7c657842ec..1c097f880d 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -6575,6 +6575,7 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux) /* send gap events until the stream catches up */ /* gaps can only be sent after segment is activated (segment.stop is no longer -1) */ while (GST_CLOCK_TIME_IS_VALID (stream->segment.position) && + pseudo_cur_time < (G_MAXUINT64 - gap_threshold) && pseudo_cur_time + gap_threshold < pseudo_target_time) { GstEvent *gap = gst_event_new_gap (stream->segment.position, gap_threshold); |