diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-10-10 13:00:50 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-10-10 13:00:50 +0000 |
commit | de9fe002f82d6b55a2400b534bbdc9cf463ac100 (patch) | |
tree | ee9eede5ca0a5ba7e2b1a05644227e8f59104700 /libavformat/mxf.c | |
parent | 4a775c19cdbe18e5a4b84d34e80a1e421dfd6268 (diff) | |
download | ffmpeg-de9fe002f82d6b55a2400b534bbdc9cf463ac100.tar.gz |
rewind completely if sample time is negative
Originally committed as revision 6629 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r-- | libavformat/mxf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c index 8a5d5a65ea..5277028f17 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -1033,8 +1033,10 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti int64_t seconds; int i; - if (!s->bit_rate || sample_time < 0) + if (!s->bit_rate) return -1; + if (sample_time < 0) + sample_time = 0; seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den); url_fseek(&s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET); /* sync on KLV essence element */ |