Browse Source

[r3d] Check return value of avio_seek and avoid modifying state if it fails

tags/n0.9
Joakim Plate 14 years ago
parent
commit
425907809b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/r3d.c

+ 2
- 1
libavformat/r3d.c View File

@@ -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;


Loading…
Cancel
Save