[FFmpeg-devel] [PATCH 28/28] changed: check for seek error when attempting to read timestamp in rm demuxer

Mans Rullgard mans
Wed Jun 30 11:09:56 CEST 2010


From: Cory Fields <theuni-nospam- at xbmc.org>

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

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index b9061a2..4ab4457 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -903,7 +903,9 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
     if(rm->old_format)
         return AV_NOPTS_VALUE;
 
-    url_fseek(s->pb, pos, SEEK_SET);
+    if (url_fseek(s->pb, pos, SEEK_SET) < 0)
+        return AV_NOPTS_VALUE;
+
     rm->remaining_len=0;
     for(;;){
         int seq=1;
-- 
1.7.1.1




More information about the ffmpeg-devel mailing list