mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mp3dec: forward errors for av_get_packet().
Don't invent a bogus EIO error. The code now doesn't check for ret == 0, but that check is redundant, av_get_packet() never returns 0.
This commit is contained in:
parent
67b1156fe8
commit
f73e3938ac
@ -188,11 +188,10 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
int ret;
|
||||
|
||||
ret = av_get_packet(s->pb, pkt, MP3_PACKET_SIZE);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
pkt->stream_index = 0;
|
||||
if (ret <= 0) {
|
||||
return AVERROR(EIO);
|
||||
}
|
||||
|
||||
if (ret > ID3v1_TAG_SIZE &&
|
||||
memcmp(&pkt->data[ret - ID3v1_TAG_SIZE], "TAG", 3) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user