[FFmpeg-cvslog] [mpc8] Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate
git at videolan.org
Wed Sep 14 20:05:36 CEST 2011
ffmpeg | branch: master | Joakim Plate <elupus at ecce.se> | Wed Sep 14 19:26:32 2011 +0200| [88ad79415c3821e5c4f3cb4d5b289d772fcac621] | committer: Joakim Plate
[mpc8] Check return value of avio_seek and avoid modifying state if it fails
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88ad79415c3821e5c4f3cb4d5b289d772fcac621
---
libavformat/mpc8.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 7a4cbbc..5b43884 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list