]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bink.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / bink.c
index 22beb4cbbd0b5c29a19a174f46b4febc54379032..3bcaff3c51b0eabfef7f40eb2acf8bda496cc25d 100644 (file)
@@ -98,7 +98,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(EIO);
     }
 
-    avio_seek(pb, 4, SEEK_CUR);
+    avio_skip(pb, 4);
 
     vst->codec->width  = avio_rl32(pb);
     vst->codec->height = avio_rl32(pb);
@@ -127,7 +127,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
     }
 
     if (bink->num_audio_tracks) {
-        avio_seek(pb, 4 * bink->num_audio_tracks, SEEK_CUR);
+        avio_skip(pb, 4 * bink->num_audio_tracks);
 
         for (i = 0; i < bink->num_audio_tracks; i++) {
             ast = av_new_stream(s, 1);
@@ -169,7 +169,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
                            keyframe ? AVINDEX_KEYFRAME : 0);
     }
 
-    avio_seek(pb, 4, SEEK_CUR);
+    avio_skip(pb, 4);
 
     bink->current_track = -1;
     return 0;
@@ -225,7 +225,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
                     AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codec->channels);
             return 0;
         } else {
-            avio_seek(pb, audio_size, SEEK_CUR);
+            avio_skip(pb, audio_size);
         }
     }
 
@@ -247,7 +247,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, in
     BinkDemuxContext *bink = s->priv_data;
     AVStream *vst = s->streams[0];
 
-    if (url_is_streamed(s->pb))
+    if (!s->pb->seekable)
         return -1;
 
     /* seek to the first frame */