summaryrefslogtreecommitdiff
path: root/libavformat/r3d.c
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2011-09-14 19:32:29 +0200
committerJoakim Plate <elupus@ecce.se>2011-09-14 19:53:45 +0200
commit425907809b48a7f44c0508e3dc09b8ba0c023d06 (patch)
tree909c9e47b4f8e6a343f97a33b600130e3c6e5902 /libavformat/r3d.c
parente22155ef0eb393dfc8f6e2a6d9d47d95a8aea9c3 (diff)
[r3d] Check return value of avio_seek and avoid modifying state if it fails
Diffstat (limited to 'libavformat/r3d.c')
-rw-r--r--libavformat/r3d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 4658ea1e5d..d84fd2cc1d 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -365,7 +365,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;