]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/swfdec.c
mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
[ffmpeg] / libavformat / swfdec.c
index 1fc301b69623653e7ac408416c3dced3a8026a85..c0b2e1759bbf848ab7f110756dfa3649b68ca8f2 100644 (file)
@@ -3,20 +3,20 @@
  * Copyright (c) 2000 Fabrice Bellard
  * Copyright (c) 2003 Tinic Uro
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -27,8 +27,8 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
 {
     int tag, len;
 
-    if (pb->eof_reached)
-        return -1;
+    if (url_feof(pb))
+        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;