Mercurial > libavcodec.hg
comparison 4xm.c @ 2628:511e3afc43e1 libavcodec
Ministry of English Composition, reporting for duty (and the word is "skipped", not "skiped"; "skiped" would rhyme with "hyped")
author | melanson |
---|---|
date | Sun, 24 Apr 2005 17:21:11 +0000 |
parents | f67b63ed036d |
children | fde28cb7e3d5 |
comparison
equal
deleted
inserted
replaced
2627:bf158d23bbcc | 2628:511e3afc43e1 |
---|---|
562 uint8_t *prestream= buf + bitstream_size + 12; | 562 uint8_t *prestream= buf + bitstream_size + 12; |
563 | 563 |
564 if(prestream_size + bitstream_size + 12 != length | 564 if(prestream_size + bitstream_size + 12 != length |
565 || bitstream_size > (1<<26) | 565 || bitstream_size > (1<<26) |
566 || prestream_size > (1<<26)){ | 566 || prestream_size > (1<<26)){ |
567 av_log(f->avctx, AV_LOG_ERROR, "size missmatch %d %d %d\n", prestream_size, bitstream_size, length); | 567 av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n", prestream_size, bitstream_size, length); |
568 return -1; | 568 return -1; |
569 } | 569 } |
570 | 570 |
571 prestream= read_huffman_tables(f, prestream); | 571 prestream= read_huffman_tables(f, prestream); |
572 | 572 |
589 } | 589 } |
590 dst += 16*stride; | 590 dst += 16*stride; |
591 } | 591 } |
592 | 592 |
593 if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256) | 593 if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256) |
594 av_log(f->avctx, AV_LOG_ERROR, "end missmatch\n"); | 594 av_log(f->avctx, AV_LOG_ERROR, "end mismatch\n"); |
595 | 595 |
596 return 0; | 596 return 0; |
597 } | 597 } |
598 | 598 |
599 static int decode_frame(AVCodecContext *avctx, | 599 static int decode_frame(AVCodecContext *avctx, |
605 AVFrame *p, temp; | 605 AVFrame *p, temp; |
606 int i, frame_4cc, frame_size; | 606 int i, frame_4cc, frame_size; |
607 | 607 |
608 frame_4cc= get32(buf); | 608 frame_4cc= get32(buf); |
609 if(buf_size != get32(buf+4)+8){ | 609 if(buf_size != get32(buf+4)+8){ |
610 av_log(f->avctx, AV_LOG_ERROR, "size missmatch %d %d\n", buf_size, get32(buf+4)); | 610 av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, get32(buf+4)); |
611 } | 611 } |
612 | 612 |
613 if(frame_4cc == ff_get_fourcc("cfrm")){ | 613 if(frame_4cc == ff_get_fourcc("cfrm")){ |
614 int free_index=-1; | 614 int free_index=-1; |
615 const int data_size= buf_size - 20; | 615 const int data_size= buf_size - 20; |
641 if(cfrm->size >= whole_size){ | 641 if(cfrm->size >= whole_size){ |
642 buf= cfrm->data; | 642 buf= cfrm->data; |
643 frame_size= cfrm->size; | 643 frame_size= cfrm->size; |
644 | 644 |
645 if(id != avctx->frame_number){ | 645 if(id != avctx->frame_number){ |
646 av_log(f->avctx, AV_LOG_ERROR, "cframe id missmatch %d %d\n", id, avctx->frame_number); | 646 av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n", id, avctx->frame_number); |
647 } | 647 } |
648 | 648 |
649 cfrm->size= cfrm->id= 0; | 649 cfrm->size= cfrm->id= 0; |
650 frame_4cc= ff_get_fourcc("pfrm"); | 650 frame_4cc= ff_get_fourcc("pfrm"); |
651 }else | 651 }else |