Mercurial > libavcodec.hg
comparison wmv2.c @ 1183:03b97d87dcdd libavcodec
10l (use before malloc)
author | michaelni |
---|---|
date | Sat, 12 Apr 2003 15:00:32 +0000 |
parents | fea03d2c4946 |
children | 9da267732f68 |
comparison
equal
deleted
inserted
replaced
1182:38e8b8f331cb | 1183:03b97d87dcdd |
---|---|
347 } | 347 } |
348 | 348 |
349 int ff_wmv2_decode_picture_header(MpegEncContext * s) | 349 int ff_wmv2_decode_picture_header(MpegEncContext * s) |
350 { | 350 { |
351 Wmv2Context * const w= (Wmv2Context*)s; | 351 Wmv2Context * const w= (Wmv2Context*)s; |
352 int code, i; | 352 int code; |
353 | 353 |
354 #if 0 | 354 #if 0 |
355 { | 355 { |
356 int i; | 356 int i; |
357 for(i=0; i<s->gb.size*8; i++) | 357 for(i=0; i<s->gb.size*8; i++) |
368 if(s->pict_type == I_TYPE){ | 368 if(s->pict_type == I_TYPE){ |
369 code = get_bits(&s->gb, 7); | 369 code = get_bits(&s->gb, 7); |
370 printf("I7:%X/\n", code); | 370 printf("I7:%X/\n", code); |
371 } | 371 } |
372 s->qscale = get_bits(&s->gb, 5); | 372 s->qscale = get_bits(&s->gb, 5); |
373 if(s->qscale < 0) | |
374 return -1; | |
375 | |
376 return 0; | |
377 } | |
378 | |
379 int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s) | |
380 { | |
381 Wmv2Context * const w= (Wmv2Context*)s; | |
373 | 382 |
374 if (s->pict_type == I_TYPE) { | 383 if (s->pict_type == I_TYPE) { |
375 if(w->j_type_bit) w->j_type= get_bits1(&s->gb); | 384 if(w->j_type_bit) w->j_type= get_bits1(&s->gb); |
376 else w->j_type= 0; //FIXME check | 385 else w->j_type= 0; //FIXME check |
377 | 386 |