rmdec: Check return value of more avio_seek calls
authorJoakim Plate <elupus@ecce.se>
Mon, 12 Sep 2011 02:08:06 +0000 (04:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 16:03:16 +0000 (18:03 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7e4111cfe2f5d03af8d608757e897145aa252af8)

libavformat/rmdec.c

index c2eee81..b7c57af 100644 (file)
@@ -905,7 +905,9 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
     if(rm->old_format)
         return AV_NOPTS_VALUE;
 
-    avio_seek(s->pb, pos, SEEK_SET);
+    if (avio_seek(s->pb, pos, SEEK_SET) < 0)
+        return AV_NOPTS_VALUE;
+
     rm->remaining_len=0;
     for(;;){
         int seq=1;