aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-07 21:16:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-07 21:35:52 +0100
commitf65daf577af25df69f3b43a49879158d2f77f3f8 (patch)
treef2a99b20e1d1271f0fac5efaa4eb288b12be7e44
parenta572cc8c7a0354d84156cfd1611dda8891f7c4db (diff)
downloadffmpeg-f65daf577af25df69f3b43a49879158d2f77f3f8.tar.gz
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>
-rw-r--r--libavcodec/rv10.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index e10cbbf773..2334fd1f12 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -415,13 +415,15 @@ static int rv20_decode_picture_header(RVDecContext *rv)
}else{
s->time= seq;
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);