mp3demux: pass on error code on packet read.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Sep 2011 22:51:53 +0000 (00:51 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 19:04:51 +0000 (21:04 +0200)
Reported-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c83442b0571370b946d3f8bb85c46879d62ab10a)

libavformat/mp3dec.c

index 47772a4..5e3e351 100644 (file)
@@ -173,7 +173,9 @@ static int mp3_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     pkt->stream_index = 0;
     if (ret <= 0) {
-        return AVERROR(EIO);
+        if(ret<0)
+            return ret;
+        return AVERROR_EOF;
     }
 
     if (ret > ID3v1_TAG_SIZE &&