From 37563812bfe7a5e59910ccc1274275574b8fe674 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sun, 28 Jan 2007 22:46:07 +0000 Subject: fix integer/double mistake. funny because the "more accurate" frame duration calculation actually broke a/v sync for ntsc dvds. tsc tsc ;-) fixes #1544349, #1589644 CVS patchset: 8574 CVS date: 2007/01/28 22:46:07 --- src/libmpeg2/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index f20698520..a2bb868df 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -130,7 +130,7 @@ static inline void get_frame_duration (mpeg2dec_t * mpeg2dec, vo_frame_t *frame) (mpeg2dec->rff_pattern & 0xff) == 0x55) && !mpeg2dec->picture->progressive_sequence ) { /* special case for ntsc 3:2 pulldown */ - duration *= 5 / 4; + duration *= 5.0 / 4.0; } else { @@ -139,7 +139,7 @@ static inline void get_frame_duration (mpeg2dec_t * mpeg2dec, vo_frame_t *frame) frame->progressive_frame ) { /* decoder should output 3 fields, so adjust duration to count on this extra field time */ - duration *= 3 / 2; + duration *= 3.0 / 2.0; } else if( mpeg2dec->picture->progressive_sequence ) { /* for progressive sequences the output should repeat the frame 1 or 2 times depending on top_field_first flag. */ -- cgit v1.2.3