summaryrefslogtreecommitdiff
path: root/gst/isomp4
diff options
context:
space:
mode:
Diffstat (limited to 'gst/isomp4')
-rw-r--r--gst/isomp4/qtdemux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 61dd18b86..b32385929 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -5195,8 +5195,9 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
*/
prev_pts = gst_adapter_prev_pts (demux->adapter, &dist);
prev_offset = demux->offset - dist;
- if (demux->fragment_start_offset == -1
- || prev_offset > demux->fragment_start_offset) {
+ /* safeguard with 4k distance */
+ if (dist < 4096 && (demux->fragment_start_offset == -1
+ || prev_offset > demux->fragment_start_offset)) {
demux->fragment_start_offset = prev_offset;
demux->fragment_start = prev_pts;
GST_DEBUG_OBJECT (demux,