mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/pva: Check for EOF before retrying in read_part_of_packet()
Fixes: Infinite loop Fixes: pva-4b1835dbc2027bf3c567005dcc78e85199240d06 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a7e032a277
commit
9807d3976b
@ -134,6 +134,10 @@ recover:
|
||||
pes_flags = avio_rb16(pb);
|
||||
pes_header_data_length = avio_r8(pb);
|
||||
|
||||
if (avio_feof(pb)) {
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
|
||||
if (pes_signal != 1 || pes_header_data_length == 0) {
|
||||
pva_log(s, AV_LOG_WARNING, "expected non empty signaled PES packet, "
|
||||
"trying to recover\n");
|
||||
|
Loading…
Reference in New Issue
Block a user