From 3df319e1aefae857e22be20831fa9c91c71b11eb Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Wed, 18 Jun 2003 10:36:18 +0000 Subject: Some minor updates. The reset call is needed when seeking, but does not work yet. CVS patchset: 5062 CVS date: 2003/06/18 10:36:18 --- src/libmpeg2new/libmpeg2/decode.c | 2 ++ src/libmpeg2new/libmpeg2/header.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) (limited to 'src/libmpeg2new/libmpeg2') diff --git a/src/libmpeg2new/libmpeg2/decode.c b/src/libmpeg2new/libmpeg2/decode.c index 640861b5c..7d096c835 100644 --- a/src/libmpeg2new/libmpeg2/decode.c +++ b/src/libmpeg2new/libmpeg2/decode.c @@ -233,6 +233,8 @@ mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec) case 0xb8: mpeg2dec->action = mpeg2_parse_header; break; + case 0xb2: + printf("libmpeg2:USER DATA for CC\n"); default: mpeg2dec->action = seek_chunk; return STATE_INVALID; diff --git a/src/libmpeg2new/libmpeg2/header.c b/src/libmpeg2new/libmpeg2/header.c index 3c47119be..c0910505f 100644 --- a/src/libmpeg2new/libmpeg2/header.c +++ b/src/libmpeg2new/libmpeg2/header.c @@ -726,6 +726,26 @@ mpeg2_state_t mpeg2_header_end_btype (mpeg2dec_t * mpeg2dec) mpeg2dec->action = mpeg2_header_end_btype2; return STATE_SLICE; } + +mpeg2_state_t mpeg2_reset (mpeg2dec_t * mpeg2dec) +{ + mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[0]; + mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[0]; + mpeg2dec->fbuf[0]=0; + mpeg2dec->action = mpeg2_header_end_btype; + mpeg2dec->shift = 0xffffff00; + mpeg2dec->code = 0xb4; + mpeg2dec->first_decode_slice = 1; + mpeg2dec->nb_decode_slices = 0xb0 - 1; + mpeg2dec->decoder.scan = mpeg2_scan_norm; + mpeg2dec->picture = mpeg2dec->pictures; + mpeg2dec->first = 1; + mpeg2dec->alloc_index = 0; + mpeg2dec->alloc_index_user = 0; + + return STATE_SLICE; +} + mpeg2_state_t mpeg2_header_end_itype2 (mpeg2dec_t * mpeg2dec) { mpeg2dec->info.display_fbuf = 0; -- cgit v1.2.3