[FFmpeg-devel] [PATCH 07/28] changed: check return value of seeks to avoid messing up current stream location
Mans Rullgard
mans
Wed Jun 30 11:09:35 CEST 2010
From: Cory Fields <theuni-nospam- at xbmc.org>
---
libavformat/avidec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index befaa79..390d42f 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -190,7 +190,10 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
pos = url_ftell(pb);
- url_fseek(pb, offset+8, SEEK_SET);
+ if(url_fseek(pb, pos, SEEK_SET) < 0) {
+ av_log(s, AV_LOG_ERROR, "Failed to restore position after reading index");
+ return -1;
+ }
read_braindead_odml_indx(s, frame_num);
frame_num += duration;
--
1.7.1.1
More information about the ffmpeg-devel
mailing list