diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-01-07 21:26:14 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-14 17:29:03 +0100 |
commit | 42f9132218ca11a8e9a3c82a175b46bca092113e (patch) | |
tree | 243ed5ebd5e4a146ff14f3e4b8136fdc3ee0fd0c /libavformat/mxfdec.c | |
parent | d84bd4650b1bed882e2ac1651b4a86206aa0e363 (diff) |
mxf: Do not use int to check the seek position
Overly large files are to be expected.
Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 7126bed5e9..37e1cfa446 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -2238,8 +2238,10 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti sample_time = 0; seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den); - if ((ret = avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET)) < 0) - return ret; + seekpos = avio_seek(s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET); + if (seekpos < 0) + return seekpos; + ff_update_cur_dts(s, st, sample_time); mxf->current_edit_unit = sample_time; } else { |