comparison h263dec.c @ 747:3d4377531f6c libavcodec

mpeg4 header parser clenup (needed for parsing of VOL header in avctx->extradata)
author michaelni
date Mon, 14 Oct 2002 12:21:54 +0000
parents 25d7fb7c89be
children 4adadf210b3b
comparison
equal deleted inserted replaced
746:fccad7166d5a 747:3d4377531f6c
37 ); 37 );
38 // printf("%d\n", int(l/1000)); 38 // printf("%d\n", int(l/1000));
39 return l; 39 return l;
40 } 40 }
41 #endif 41 #endif
42
43 const UINT16 ff_mpeg4_resync_prefix[8];
44 42
45 static int h263_decode_init(AVCodecContext *avctx) 43 static int h263_decode_init(AVCodecContext *avctx)
46 { 44 {
47 MpegEncContext *s = avctx->priv_data; 45 MpegEncContext *s = avctx->priv_data;
48 46
311 309
312 /* let's go :-) */ 310 /* let's go :-) */
313 if (s->h263_msmpeg4) { 311 if (s->h263_msmpeg4) {
314 ret = msmpeg4_decode_picture_header(s); 312 ret = msmpeg4_decode_picture_header(s);
315 } else if (s->h263_pred) { 313 } else if (s->h263_pred) {
316 ret = mpeg4_decode_picture_header(s); 314 if(s->avctx->extradata_size && s->picture_number==0){
315 GetBitContext gb;
316
317 init_get_bits(&gb, s->avctx->extradata, s->avctx->extradata_size);
318 ret = ff_mpeg4_decode_picture_header(s, &gb);
319 }
320 ret = ff_mpeg4_decode_picture_header(s, &s->gb);
321
317 s->has_b_frames= !s->low_delay; 322 s->has_b_frames= !s->low_delay;
318 } else if (s->h263_intel) { 323 } else if (s->h263_intel) {
319 ret = intel_h263_decode_picture_header(s); 324 ret = intel_h263_decode_picture_header(s);
320 } else { 325 } else {
321 ret = h263_decode_picture_header(s); 326 ret = h263_decode_picture_header(s);