Browse Source

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

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

+ 2
- 1
libavformat/mxfdec.c View File

@@ -1119,7 +1119,8 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
if (sample_time < 0)
sample_time = 0;
seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
if (avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET) < 0)
return -1;
av_update_cur_dts(s, st, sample_time);
return 0;
}


Loading…
Cancel
Save