mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/electronicarts: fix EOF check
Similar to feof(), avio_feof() is only true after an actual overread. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
abb5ff373d
commit
29d1d3e2e8
@ -582,9 +582,9 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
int av_uninit(num_samples);
|
||||
|
||||
while ((!packet_read && !hit_end) || partial_packet) {
|
||||
chunk_type = avio_rl32(pb);
|
||||
if (avio_feof(pb))
|
||||
return AVERROR_EOF;
|
||||
chunk_type = avio_rl32(pb);
|
||||
chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
|
||||
if (chunk_size < 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Loading…
x
Reference in New Issue
Block a user