From bd8ad4302157f0b47ef12a733512db3570a60767 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Sat, 22 Sep 2001 13:28:40 +0000 Subject: Bug fix: video_wrap_offset calculation on first pts. Bug fix: initializing frame_width/height for mpeg2 streams correctly now. Added prebuffer pts offset to allow the decoder to actually decode prebuffered frames before being kicked by metronom. CVS patchset: 681 CVS date: 2001/09/22 13:28:40 --- src/libmpeg2/decode.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libmpeg2/decode.c') diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 6e0a3e7f0..48f5bf42c 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -104,6 +104,12 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code, picture->current_frame->bFrameBad |= mpeg2dec->drop_frame; +#if 0 +fprintf (stderr, "type %s: %s\n", + picture->picture_coding_type == I_TYPE ? "I" : + picture->picture_coding_type == P_TYPE ? "P" : "B", + picture->current_frame->bFrameBad ? "BAD" : "good"); +#endif if (picture->picture_coding_type == B_TYPE) { if (picture->mpeg1) picture->current_frame->PTS = 0; @@ -459,6 +465,8 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec, VO_PREDICTION_FLAG | VO_BOTH_FIELDS); picture->backward_reference_frame->PTS = 0; picture->backward_reference_frame->bFrameBad = 1; + picture->frame_width = picture->coded_picture_width; + picture->frame_height = picture->coded_picture_height; } } else if (code == 0xb5) { /* extension_start_code */ -- cgit v1.2.3