]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpc8.c
dvbsubdec: fix buf ptr in dvbsub_parse_region_segment()
[ffmpeg] / libavformat / mpc8.c
index 7a4cbbc8b71bab815e46f7369d7289c0562a7c69..6f722d98f36e10ea058dfd9ea39f4739ccbeb476 100644 (file)
@@ -264,7 +264,7 @@ static int mpc8_read_packet(AVFormatContext *s, AVPacket *pkt)
             return AVERROR(EIO);
         mpc8_handle_chunk(s, tag, pos, size);
     }
-    return 0;
+    return AVERROR_EOF;
 }
 
 static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
@@ -274,7 +274,8 @@ static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestam
     int index = av_index_search_timestamp(st, timestamp, flags);
 
     if(index < 0) return -1;
-    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
+    if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
+        return -1;
     c->frame = st->index_entries[index].timestamp;
     return 0;
 }