]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/wvdec.c
avformat/rtpdec_qt: Fix 'warning: passing argument 2 of ffio_init_context discards...
[ffmpeg] / libavformat / wvdec.c
index 4eaec402f71be24377a9dc6c582b808c97676dbd..76768cdf26682505436de49fc35d72443cba76e3 100644 (file)
@@ -124,7 +124,7 @@ static int wv_read_block_header(AVFormatContext *ctx, AVIOContext *pb)
                    "Cannot determine additional parameters\n");
             return AVERROR_INVALIDDATA;
         }
-        while (avio_tell(pb) < block_end) {
+        while (avio_tell(pb) < block_end && !avio_feof(pb)) {
             int id, size;
             id   = avio_r8(pb);
             size = (id & 0x80) ? avio_rl24(pb) : avio_r8(pb);
@@ -260,7 +260,7 @@ static int wv_read_packet(AVFormatContext *s, AVPacket *pkt)
     int64_t pos;
     uint32_t block_samples;
 
-    if (url_feof(s->pb))
+    if (avio_feof(s->pb))
         return AVERROR_EOF;
     if (wc->block_parsed) {
         if ((ret = wv_read_block_header(s, s->pb)) < 0)