Endless loop in qtdemux.c
This while loop in qtdemux.c#L6295 is endless for certain values of gap_threshold
and min_time
. This is because an overflow may happen if G_MAXUINT64 - min_time < gap_threshold
making the condition always true.
while (GST_CLOCK_TIME_IS_VALID (stream->segment.stop) &&
GST_CLOCK_TIME_IS_VALID (stream->segment.position) &&
stream->segment.position + gap_threshold < min_time) {
GstEvent *gap =
gst_event_new_gap (stream->segment.position, gap_threshold);
gst_pad_push_event (stream->pad, gap);
stream->segment.position += gap_threshold;
}
As additional info, this happens for me for a file recorded with gstreamer (fragmented mp4) where the recording got interrupted (connection to camera got lost). My pipeline is as simple as filesrc location="<file>" ! qtdemux ! fakesink
. Same problem when using gst-discoverer. I just want to derive the duration to be able to perform a sanity check. (ffprobe immediately returns a valid (but of course incorrect) duration of 351948:42:32.35
.)