adaptivedemux2: Only set DISCONT on beginning of fragments

This avoids accidentally setting it in the middle of a fragment, which could
cause havoc in demuxer/parsers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6961>
This commit is contained in:
Edward Hervey 2024-04-11 15:19:50 +02:00 committed by GStreamer Marge Bot
parent 59582e2ffe
commit 726f2d8dc0

View file

@ -648,15 +648,15 @@ gst_adaptive_demux2_stream_push_buffer (GstAdaptiveDemux2Stream * stream,
if (demux->have_group_id)
gst_event_set_group_id (stream_start, demux->group_id);
}
stream->first_fragment_buffer = FALSE;
if (stream->discont) {
discont = TRUE;
stream->discont = FALSE;
}
} else {
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
}
stream->first_fragment_buffer = FALSE;
if (stream->discont) {
discont = TRUE;
stream->discont = FALSE;
}
if (discont) {
GST_DEBUG_OBJECT (stream, "Marking fragment as discontinuous");