]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/swfdec.c
avconv: make timer_start a local var in transcode().
[ffmpeg] / libavformat / swfdec.c
index c567f264f171dad5b22ee0c05b6ea4af5d829d70..59977a94a6dc72edd743ca55e453f1df9c0c263d 100644 (file)
@@ -3,20 +3,20 @@
  * Copyright (c) 2000 Fabrice Bellard
  * Copyright (c) 2003 Tinic Uro
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav 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.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav 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 FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -27,7 +27,7 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
 {
     int tag, len;
 
-    if (url_feof(pb))
+    if (pb->eof_reached)
         return -1;
 
     tag = avio_rl16(pb);
@@ -70,7 +70,7 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
     /* skip rectangle size */
     nbits = avio_r8(pb) >> 3;
     len = (4 * nbits - 3 + 7) / 8;
-    url_fskip(pb, len);
+    avio_skip(pb, len);
     swf->frame_rate = avio_rl16(pb); /* 8.8 fixed */
     avio_rl16(pb); /* frame count */
 
@@ -87,7 +87,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
     int tag, len, i, frame, v;
 
     for(;;) {
-        uint64_t pos = url_ftell(pb);
+        uint64_t pos = avio_tell(pb);
         tag = get_swf_tag(pb, &len);
         if (tag < 0)
             return AVERROR(EIO);
@@ -159,7 +159,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
                 st = s->streams[i];
                 if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
             if (st->codec->codec_id == CODEC_ID_MP3) {
-                url_fskip(pb, 4);
+                avio_skip(pb, 4);
                 av_get_packet(pb, pkt, len-4);
             } else { // ADPCM, PCM
                 av_get_packet(pb, pkt, len);
@@ -202,16 +202,15 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
             return pkt->size;
         }
     skip:
-        url_fskip(pb, len);
+        avio_skip(pb, len);
     }
-    return 0;
 }
 
 AVInputFormat ff_swf_demuxer = {
-    "swf",
-    NULL_IF_CONFIG_SMALL("Flash format"),
-    sizeof(SWFContext),
-    swf_probe,
-    swf_read_header,
-    swf_read_packet,
+    .name           = "swf",
+    .long_name      = NULL_IF_CONFIG_SMALL("Flash format"),
+    .priv_data_size = sizeof(SWFContext),
+    .read_probe     = swf_probe,
+    .read_header    = swf_read_header,
+    .read_packet    = swf_read_packet,
 };