summaryrefslogtreecommitdiff
path: root/libavformat/mp3dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r--libavformat/mp3dec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 11e684d7f3..a208488930 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -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)