[FFmpeg-cvslog] rmdec: Check return value of more avio_seek calls

Joakim Plate git at videolan.org
Mon Sep 12 04:40:27 CEST 2011


ffmpeg | branch: master | Joakim Plate <elupus at ecce.se> | Mon Sep 12 04:08:06 2011 +0200| [7e4111cfe2f5d03af8d608757e897145aa252af8] | committer: Michael Niedermayer

rmdec: Check return value of more avio_seek calls

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e4111cfe2f5d03af8d608757e897145aa252af8
---

 libavformat/rmdec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 14880fe..5e34647 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -919,7 +919,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;



More information about the ffmpeg-cvslog mailing list