summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2011-12-16 05:13:58 +0100
committerMichael Niedermayer <[email protected]>2012-01-03 18:28:15 +0100
commit44e7ef15ae65a647f912ee680e4c0d6628c25d43 (patch)
treeb1242947f29b9f13472fc587cf4d7805eead69e0
parente7cb6e1c04f409db512639af1e74af28e3ae145e (diff)
avidec: Fix infinite loop caused by rounding of timestamps in non interleaved avis.
Fixes Ticket775 Bug found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit e098fba5d9c9d52aaddd83e63dd910ff20b841d2) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 116099ad6b..9c4dff63e7 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1050,7 +1050,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR_EOF;
best_ast = best_st->priv_data;
- best_ts = av_rescale_q(best_ts, (AVRational){FFMAX(1, best_ast->sample_size), AV_TIME_BASE}, best_st->time_base);
+ best_ts = best_ast->frame_offset;
if(best_ast->remaining)
i= av_index_search_timestamp(best_st, best_ts, AVSEEK_FLAG_ANY | AVSEEK_FLAG_BACKWARD);
else{