From eca059605b2dda5cdf2c5caa08bbfe054d080886 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 6 Apr 2002 02:10:33 +0000 Subject: fix bad_frame logic (bug introduced in 0.2.1 sync) CVS patchset: 1678 CVS date: 2002/04/06 02:10:33 --- src/libmpeg2/decode.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index d74be2b10..d760844c2 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -136,7 +136,7 @@ static inline void get_frame_duration (mpeg2dec_t * mpeg2dec, vo_frame_t *frame) } } - /* printf("mpeg2dec: rff=%u\n",frame->repeat_first_field); */ + printf("mpeg2dec: rff=%u\n",frame->repeat_first_field); } static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, @@ -167,12 +167,13 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, mpeg2dec->in_slice = 0; if (((picture->picture_structure == FRAME_PICTURE) || - (picture->second_field)) && - (!(mpeg2dec->drop_frame))) { - + (picture->second_field)) ) { + + if (!mpeg2dec->drop_frame) + picture->current_frame->bad_frame = 0; + if (picture->picture_coding_type == B_TYPE) { if( picture->current_frame && !picture->current_frame->drawn ) { - picture->current_frame->bad_frame = 0; /* hack against wrong mpeg1 pts */ if (picture->mpeg1) -- cgit v1.2.3