[FFmpeg-cvslog] swfdec: return correct error code at EOF

Tanami, Ohad git at videolan.org
Tue Sep 27 15:13:48 CEST 2011


ffmpeg | branch: master | Tanami, Ohad <OTanami at nds.com> | Tue Sep 27 14:48:56 2011 +0200| [99d7d1510ed2e8dd73152a5dc1a5476faf1a7939] | committer: Michael Niedermayer

swfdec: return correct error code at EOF

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99d7d1510ed2e8dd73152a5dc1a5476faf1a7939
---

 libavformat/swfdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 7bbf494..e6f659b 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -28,7 +28,7 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
     int tag, len;
 
     if (url_feof(pb))
-        return -1;
+        return AVERROR_EOF;
 
     tag = avio_rl16(pb);
     len = tag & 0x3f;
@@ -90,7 +90,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
         uint64_t pos = avio_tell(pb);
         tag = get_swf_tag(pb, &len);
         if (tag < 0)
-            return AVERROR(EIO);
+            return tag;
         if (tag == TAG_VIDEOSTREAM) {
             int ch_id = avio_rl16(pb);
             len -= 2;



More information about the ffmpeg-cvslog mailing list