Commit e098fba5 authored by Michael Niedermayer's avatar Michael Niedermayer

avidec: Fix infinite loop caused by rounding of timestamps in non interleaved avis.

Fixes Ticket775
Bug found by: Diana Elena Muscalu
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 84e57702
......@@ -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{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment