mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 01:21:06 +00:00
avformat/dashdec: don't stop at the first input EOF
The current logic would stop demuxing the entire manifest once the first Representation returned EOF, which could result in plenty of packets from other Representations being lost. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -2380,7 +2380,7 @@ static int dash_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
if (!cur) {
|
||||
return AVERROR_INVALIDDATA;
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
while (!ff_check_interrupt(c->interrupt_callback) && !ret) {
|
||||
ret = av_read_frame(cur->ctx, pkt);
|
||||
@@ -2396,9 +2396,17 @@ static int dash_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
cur->is_restart_needed = 0;
|
||||
ff_format_io_close(cur->parent, &cur->input);
|
||||
ret = reopen_demux_for_component(s, cur);
|
||||
} else if (ret == AVERROR_EOF) {
|
||||
close_demux_for_component(cur);
|
||||
ff_format_io_close(cur->parent, &cur->input);
|
||||
av_log(s, AV_LOG_DEBUG, "EOF on stream_index %d\n", cur->stream_index);
|
||||
// prevent recheck_discard_flags() from re-enabling the component
|
||||
for (int i = 0; i < cur->nb_assoc_stream; i++)
|
||||
cur->assoc_stream[i]->discard = AVDISCARD_ALL;
|
||||
return FFERROR_REDO;
|
||||
}
|
||||
}
|
||||
return AVERROR_EOF;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dash_close(AVFormatContext *s)
|
||||
|
||||
Reference in New Issue
Block a user