]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/filmstripdec.c
Cosmetics: Fix comment.
[ffmpeg] / libavformat / filmstripdec.c
index 568bc0d17ac6a6f972997f33ae81ea12e197ebbf..3963b53c0a90ef7691a45c5847230224d4340c83 100644 (file)
@@ -40,7 +40,7 @@ static int read_header(AVFormatContext *s,
     AVIOContext *pb = s->pb;
     AVStream *st;
 
-    if (url_is_streamed(s->pb))
+    if (!s->pb->seekable)
         return AVERROR(EIO);
 
     avio_seek(pb, avio_size(pb) - 36, SEEK_SET);
@@ -59,7 +59,7 @@ static int read_header(AVFormatContext *s,
         return AVERROR_INVALIDDATA;
     }
 
-    avio_seek(pb, 2, SEEK_CUR);
+    avio_skip(pb, 2);
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_RAWVIDEO;
     st->codec->pix_fmt    = PIX_FMT_RGBA;
@@ -80,11 +80,11 @@ static int read_packet(AVFormatContext *s,
     FilmstripDemuxContext *film = s->priv_data;
     AVStream *st = s->streams[0];
 
-    if (s->pb->eof_reached)
+    if (url_feof(s->pb))
         return AVERROR(EIO);
     pkt->dts = avio_tell(s->pb) / (st->codec->width * (st->codec->height + film->leading) * 4);
     pkt->size = av_get_packet(s->pb, pkt, st->codec->width * st->codec->height * 4);
-    avio_seek(s->pb, st->codec->width * film->leading * 4, SEEK_CUR);
+    avio_skip(s->pb, st->codec->width * film->leading * 4);
     if (pkt->size < 0)
         return pkt->size;
     pkt->flags |= AV_PKT_FLAG_KEY;
@@ -99,13 +99,11 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in
 }
 
 AVInputFormat ff_filmstrip_demuxer = {
-    "filmstrip",
-    NULL_IF_CONFIG_SMALL("Adobe Filmstrip"),
-    sizeof(FilmstripDemuxContext),
-    NULL,
-    read_header,
-    read_packet,
-    NULL,
-    read_seek,
+    .name           = "filmstrip",
+    .long_name      = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"),
+    .priv_data_size = sizeof(FilmstripDemuxContext),
+    .read_header    = read_header,
+    .read_packet    = read_packet,
+    .read_seek      = read_seek,
     .extensions = "flm",
 };