mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
rv10: always check direct mode interpolation times.
Fixes Division by 0 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a572cc8c7a
commit
f65daf577a
@ -415,13 +415,15 @@ static int rv20_decode_picture_header(RVDecContext *rv)
|
|||||||
}else{
|
}else{
|
||||||
s->time= seq;
|
s->time= seq;
|
||||||
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
|
s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
|
||||||
if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
|
|
||||||
av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible from seeking? skipping current b frame\n");
|
|
||||||
return FRAME_SKIPPED;
|
|
||||||
}
|
|
||||||
ff_mpeg4_init_direct_mv(s);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (s->pict_type==AV_PICTURE_TYPE_B) {
|
||||||
|
if(s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0){
|
||||||
|
av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible from seeking? skipping current b frame\n");
|
||||||
|
return FRAME_SKIPPED;
|
||||||
|
}
|
||||||
|
ff_mpeg4_init_direct_mv(s);
|
||||||
|
}
|
||||||
|
|
||||||
s->no_rounding= get_bits1(&s->gb);
|
s->no_rounding= get_bits1(&s->gb);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user