aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2012-02-03 19:13:42 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-10 15:27:49 -0500
commitc7b08bc0a71f9e54e0d5036a8195648b41bd3933 (patch)
tree75dfeb5363b5e11ecb0b4362d003d332823a8a4a
parent8dcd00eabddab5e3366173391b87fa99e9132c36 (diff)
downloadffmpeg-c7b08bc0a71f9e54e0d5036a8195648b41bd3933.tar.gz
r3d: Check return value of avio_seek and avoid modifying state if it fails
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
-rw-r--r--libavformat/r3d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 7f0e8de0e4..2674578aa0 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -366,7 +366,8 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
frame_num, sample_time);
if (frame_num < r3d->video_offsets_count) {
- avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET);
+ if (avio_seek(s->pb, r3d->video_offsets_count, SEEK_SET) < 0)
+ return -1;
} else {
av_log(s, AV_LOG_ERROR, "could not seek to frame %d\n", frame_num);
return -1;