summaryrefslogtreecommitdiff
path: root/src/libmpeg2/decode.c
diff options
context:
space:
mode:
authorMatthias Hopf <mat@mshopf.de>2001-09-22 13:28:40 +0000
committerMatthias Hopf <mat@mshopf.de>2001-09-22 13:28:40 +0000
commitbd8ad4302157f0b47ef12a733512db3570a60767 (patch)
tree62de0b9bc190cbe2ce462805cc1aee3db938887e /src/libmpeg2/decode.c
parent360bbfcf85a212c72a178db136f9cf7b95db89c1 (diff)
downloadxine-lib-bd8ad4302157f0b47ef12a733512db3570a60767.tar.gz
xine-lib-bd8ad4302157f0b47ef12a733512db3570a60767.tar.bz2
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
Diffstat (limited to 'src/libmpeg2/decode.c')
-rw-r--r--src/libmpeg2/decode.c8
1 files changed, 8 insertions, 0 deletions
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 */