comparison vorbis_dec.c @ 10251:b9ea1706bf27 libavcodec

Make error return sign consistent.
author michael
date Wed, 23 Sep 2009 13:18:29 +0000
parents 6e01bba7a930
children b9f5f8b8f073
comparison
equal deleted inserted replaced
10250:6e01bba7a930 10251:b9ea1706bf27
411 411
412 // Error: 412 // Error:
413 error: 413 error:
414 av_free(tmp_vlc_bits); 414 av_free(tmp_vlc_bits);
415 av_free(tmp_vlc_codes); 415 av_free(tmp_vlc_codes);
416 return 1; 416 return -1;
417 } 417 }
418 418
419 // Process time domain transforms part (unused in Vorbis I) 419 // Process time domain transforms part (unused in Vorbis I)
420 420
421 static int vorbis_parse_setup_hdr_tdtransforms(vorbis_context *vc) { 421 static int vorbis_parse_setup_hdr_tdtransforms(vorbis_context *vc) {
428 428
429 AV_DEBUG(" Vorbis time domain transform %d: %d \n", vorbis_time_count, vorbis_tdtransform); 429 AV_DEBUG(" Vorbis time domain transform %d: %d \n", vorbis_time_count, vorbis_tdtransform);
430 430
431 if (vorbis_tdtransform) { 431 if (vorbis_tdtransform) {
432 av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis time domain transform data nonzero. \n"); 432 av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis time domain transform data nonzero. \n");
433 return 1; 433 return -1;
434 } 434 }
435 } 435 }
436 return 0; 436 return 0;
437 } 437 }
438 438
489 489
490 if (floor_setup->data.t1.class_subclasses[j]) { 490 if (floor_setup->data.t1.class_subclasses[j]) {
491 int bits=get_bits(gb, 8); 491 int bits=get_bits(gb, 8);
492 if (bits>=vc->codebook_count) { 492 if (bits>=vc->codebook_count) {
493 av_log(vc->avccontext, AV_LOG_ERROR, "Masterbook index %d is out of range.\n", bits); 493 av_log(vc->avccontext, AV_LOG_ERROR, "Masterbook index %d is out of range.\n", bits);
494 return 1; 494 return -1;
495 } 495 }
496 floor_setup->data.t1.class_masterbook[j]=bits; 496 floor_setup->data.t1.class_masterbook[j]=bits;
497 497
498 AV_DEBUG(" masterbook: %d \n", floor_setup->data.t1.class_masterbook[j]); 498 AV_DEBUG(" masterbook: %d \n", floor_setup->data.t1.class_masterbook[j]);
499 } 499 }
500 500
501 for(k=0;k<(1<<floor_setup->data.t1.class_subclasses[j]);++k) { 501 for(k=0;k<(1<<floor_setup->data.t1.class_subclasses[j]);++k) {
502 int16_t bits=get_bits(gb, 8)-1; 502 int16_t bits=get_bits(gb, 8)-1;
503 if (bits!=-1 && bits>=vc->codebook_count) { 503 if (bits!=-1 && bits>=vc->codebook_count) {
504 av_log(vc->avccontext, AV_LOG_ERROR, "Subclass book index %d is out of range.\n", bits); 504 av_log(vc->avccontext, AV_LOG_ERROR, "Subclass book index %d is out of range.\n", bits);
505 return 1; 505 return -1;
506 } 506 }
507 floor_setup->data.t1.subclass_books[j][k]=bits; 507 floor_setup->data.t1.subclass_books[j][k]=bits;
508 508
509 AV_DEBUG(" book %d. : %d \n", k, floor_setup->data.t1.subclass_books[j][k]); 509 AV_DEBUG(" book %d. : %d \n", k, floor_setup->data.t1.subclass_books[j][k]);
510 } 510 }
547 /* zero would result in a div by zero later * 547 /* zero would result in a div by zero later *
548 * 2^0 - 1 == 0 */ 548 * 2^0 - 1 == 0 */
549 if (floor_setup->data.t0.amplitude_bits == 0) { 549 if (floor_setup->data.t0.amplitude_bits == 0) {
550 av_log(vc->avccontext, AV_LOG_ERROR, 550 av_log(vc->avccontext, AV_LOG_ERROR,
551 "Floor 0 amplitude bits is 0.\n"); 551 "Floor 0 amplitude bits is 0.\n");
552 return 1; 552 return -1;
553 } 553 }
554 floor_setup->data.t0.amplitude_offset=get_bits(gb, 8); 554 floor_setup->data.t0.amplitude_offset=get_bits(gb, 8);
555 floor_setup->data.t0.num_books=get_bits(gb, 4)+1; 555 floor_setup->data.t0.num_books=get_bits(gb, 4)+1;
556 556
557 /* allocate mem for booklist */ 557 /* allocate mem for booklist */
558 floor_setup->data.t0.book_list= 558 floor_setup->data.t0.book_list=
559 av_malloc(floor_setup->data.t0.num_books); 559 av_malloc(floor_setup->data.t0.num_books);
560 if(!floor_setup->data.t0.book_list) { return 1; } 560 if(!floor_setup->data.t0.book_list) { return -1; }
561 /* read book indexes */ 561 /* read book indexes */
562 { 562 {
563 int idx; 563 int idx;
564 uint_fast8_t book_idx; 564 uint_fast8_t book_idx;
565 for (idx=0;idx<floor_setup->data.t0.num_books;++idx) { 565 for (idx=0;idx<floor_setup->data.t0.num_books;++idx) {
566 book_idx=get_bits(gb, 8); 566 book_idx=get_bits(gb, 8);
567 if (book_idx>=vc->codebook_count) 567 if (book_idx>=vc->codebook_count)
568 return 1; 568 return -1;
569 floor_setup->data.t0.book_list[idx]=book_idx; 569 floor_setup->data.t0.book_list[idx]=book_idx;
570 if (vc->codebooks[book_idx].dimensions > max_codebook_dim) 570 if (vc->codebooks[book_idx].dimensions > max_codebook_dim)
571 max_codebook_dim=vc->codebooks[book_idx].dimensions; 571 max_codebook_dim=vc->codebooks[book_idx].dimensions;
572 } 572 }
573 } 573 }
579 /* codebook dim is for padding if codebook dim doesn't * 579 /* codebook dim is for padding if codebook dim doesn't *
580 * divide order+1 then we need to read more data */ 580 * divide order+1 then we need to read more data */
581 floor_setup->data.t0.lsp= 581 floor_setup->data.t0.lsp=
582 av_malloc((floor_setup->data.t0.order+1 + max_codebook_dim) 582 av_malloc((floor_setup->data.t0.order+1 + max_codebook_dim)
583 * sizeof(float)); 583 * sizeof(float));
584 if(!floor_setup->data.t0.lsp) { return 1; } 584 if(!floor_setup->data.t0.lsp) { return -1; }
585 } 585 }
586 586
587 #ifdef V_DEBUG /* debug output parsed headers */ 587 #ifdef V_DEBUG /* debug output parsed headers */
588 AV_DEBUG("floor0 order: %u\n", floor_setup->data.t0.order); 588 AV_DEBUG("floor0 order: %u\n", floor_setup->data.t0.order);
589 AV_DEBUG("floor0 rate: %u\n", floor_setup->data.t0.rate); 589 AV_DEBUG("floor0 rate: %u\n", floor_setup->data.t0.rate);
607 } 607 }
608 #endif 608 #endif
609 } 609 }
610 else { 610 else {
611 av_log(vc->avccontext, AV_LOG_ERROR, "Invalid floor type!\n"); 611 av_log(vc->avccontext, AV_LOG_ERROR, "Invalid floor type!\n");
612 return 1; 612 return -1;
613 } 613 }
614 } 614 }
615 return 0; 615 return 0;
616 } 616 }
617 617
642 /* Validations to prevent a buffer overflow later. */ 642 /* Validations to prevent a buffer overflow later. */
643 if (res_setup->begin>res_setup->end 643 if (res_setup->begin>res_setup->end
644 || res_setup->end>vc->blocksize[1]/(res_setup->type==2?1:2) 644 || res_setup->end>vc->blocksize[1]/(res_setup->type==2?1:2)
645 || (res_setup->end-res_setup->begin)/res_setup->partition_size>V_MAX_PARTITIONS) { 645 || (res_setup->end-res_setup->begin)/res_setup->partition_size>V_MAX_PARTITIONS) {
646 av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %d, %d, %d, %d, %d\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1]/2); 646 av_log(vc->avccontext, AV_LOG_ERROR, "partition out of bounds: type, begin, end, size, blocksize: %d, %d, %d, %d, %d\n", res_setup->type, res_setup->begin, res_setup->end, res_setup->partition_size, vc->blocksize[1]/2);
647 return 1; 647 return -1;
648 } 648 }
649 649
650 res_setup->classifications=get_bits(gb, 6)+1; 650 res_setup->classifications=get_bits(gb, 6)+1;
651 res_setup->classbook=get_bits(gb, 8); 651 res_setup->classbook=get_bits(gb, 8);
652 if (res_setup->classbook>=vc->codebook_count) { 652 if (res_setup->classbook>=vc->codebook_count) {
653 av_log(vc->avccontext, AV_LOG_ERROR, "classbook value %d out of range. \n", res_setup->classbook); 653 av_log(vc->avccontext, AV_LOG_ERROR, "classbook value %d out of range. \n", res_setup->classbook);
654 return 1; 654 return -1;
655 } 655 }
656 656
657 AV_DEBUG(" begin %d end %d part.size %d classif.s %d classbook %d \n", res_setup->begin, res_setup->end, res_setup->partition_size, 657 AV_DEBUG(" begin %d end %d part.size %d classif.s %d classbook %d \n", res_setup->begin, res_setup->end, res_setup->partition_size,
658 res_setup->classifications, res_setup->classbook); 658 res_setup->classifications, res_setup->classbook);
659 659
673 for(k=0;k<8;++k) { 673 for(k=0;k<8;++k) {
674 if (cascade[j]&(1<<k)) { 674 if (cascade[j]&(1<<k)) {
675 int bits=get_bits(gb, 8); 675 int bits=get_bits(gb, 8);
676 if (bits>=vc->codebook_count) { 676 if (bits>=vc->codebook_count) {
677 av_log(vc->avccontext, AV_LOG_ERROR, "book value %d out of range. \n", bits); 677 av_log(vc->avccontext, AV_LOG_ERROR, "book value %d out of range. \n", bits);
678 return 1; 678 return -1;
679 } 679 }
680 res_setup->books[j][k]=bits; 680 res_setup->books[j][k]=bits;
681 681
682 AV_DEBUG(" %d class casscade depth %d book: %d \n", j, k, res_setup->books[j][k]); 682 AV_DEBUG(" %d class casscade depth %d book: %d \n", j, k, res_setup->books[j][k]);
683 683
707 for(i=0;i<vc->mapping_count;++i) { 707 for(i=0;i<vc->mapping_count;++i) {
708 vorbis_mapping *mapping_setup=&vc->mappings[i]; 708 vorbis_mapping *mapping_setup=&vc->mappings[i];
709 709
710 if (get_bits(gb, 16)) { 710 if (get_bits(gb, 16)) {
711 av_log(vc->avccontext, AV_LOG_ERROR, "Other mappings than type 0 are not compliant with the Vorbis I specification. \n"); 711 av_log(vc->avccontext, AV_LOG_ERROR, "Other mappings than type 0 are not compliant with the Vorbis I specification. \n");
712 return 1; 712 return -1;
713 } 713 }
714 if (get_bits1(gb)) { 714 if (get_bits1(gb)) {
715 mapping_setup->submaps=get_bits(gb, 4)+1; 715 mapping_setup->submaps=get_bits(gb, 4)+1;
716 } else { 716 } else {
717 mapping_setup->submaps=1; 717 mapping_setup->submaps=1;
724 for(j=0;j<mapping_setup->coupling_steps;++j) { 724 for(j=0;j<mapping_setup->coupling_steps;++j) {
725 mapping_setup->magnitude[j]=get_bits(gb, ilog(vc->audio_channels-1)); 725 mapping_setup->magnitude[j]=get_bits(gb, ilog(vc->audio_channels-1));
726 mapping_setup->angle[j]=get_bits(gb, ilog(vc->audio_channels-1)); 726 mapping_setup->angle[j]=get_bits(gb, ilog(vc->audio_channels-1));
727 if (mapping_setup->magnitude[j]>=vc->audio_channels) { 727 if (mapping_setup->magnitude[j]>=vc->audio_channels) {
728 av_log(vc->avccontext, AV_LOG_ERROR, "magnitude channel %d out of range. \n", mapping_setup->magnitude[j]); 728 av_log(vc->avccontext, AV_LOG_ERROR, "magnitude channel %d out of range. \n", mapping_setup->magnitude[j]);
729 return 1; 729 return -1;
730 } 730 }
731 if (mapping_setup->angle[j]>=vc->audio_channels) { 731 if (mapping_setup->angle[j]>=vc->audio_channels) {
732 av_log(vc->avccontext, AV_LOG_ERROR, "angle channel %d out of range. \n", mapping_setup->angle[j]); 732 av_log(vc->avccontext, AV_LOG_ERROR, "angle channel %d out of range. \n", mapping_setup->angle[j]);
733 return 1; 733 return -1;
734 } 734 }
735 } 735 }
736 } else { 736 } else {
737 mapping_setup->coupling_steps=0; 737 mapping_setup->coupling_steps=0;
738 } 738 }
739 739
740 AV_DEBUG(" %d mapping coupling steps: %d \n", i, mapping_setup->coupling_steps); 740 AV_DEBUG(" %d mapping coupling steps: %d \n", i, mapping_setup->coupling_steps);
741 741
742 if(get_bits(gb, 2)) { 742 if(get_bits(gb, 2)) {
743 av_log(vc->avccontext, AV_LOG_ERROR, "%d. mapping setup data invalid. \n", i); 743 av_log(vc->avccontext, AV_LOG_ERROR, "%d. mapping setup data invalid. \n", i);
744 return 1; // following spec. 744 return -1; // following spec.
745 } 745 }
746 746
747 if (mapping_setup->submaps>1) { 747 if (mapping_setup->submaps>1) {
748 mapping_setup->mux=av_mallocz(vc->audio_channels * sizeof(uint_fast8_t)); 748 mapping_setup->mux=av_mallocz(vc->audio_channels * sizeof(uint_fast8_t));
749 for(j=0;j<vc->audio_channels;++j) { 749 for(j=0;j<vc->audio_channels;++j) {
818 mode_setup->windowtype=get_bits(gb, 16); //FIXME check 818 mode_setup->windowtype=get_bits(gb, 16); //FIXME check
819 mode_setup->transformtype=get_bits(gb, 16); //FIXME check 819 mode_setup->transformtype=get_bits(gb, 16); //FIXME check
820 mode_setup->mapping=get_bits(gb, 8); 820 mode_setup->mapping=get_bits(gb, 8);
821 if (mode_setup->mapping>=vc->mapping_count) { 821 if (mode_setup->mapping>=vc->mapping_count) {
822 av_log(vc->avccontext, AV_LOG_ERROR, "mode mapping value %d out of range. \n", mode_setup->mapping); 822 av_log(vc->avccontext, AV_LOG_ERROR, "mode mapping value %d out of range. \n", mode_setup->mapping);
823 return 1; 823 return -1;
824 } 824 }
825 825
826 AV_DEBUG(" %d mode: blockflag %d, windowtype %d, transformtype %d, mapping %d \n", i, mode_setup->blockflag, mode_setup->windowtype, mode_setup->transformtype, mode_setup->mapping); 826 AV_DEBUG(" %d mode: blockflag %d, windowtype %d, transformtype %d, mapping %d \n", i, mode_setup->blockflag, mode_setup->windowtype, mode_setup->transformtype, mode_setup->mapping);
827 } 827 }
828 return 0; 828 return 0;
835 835
836 if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') || 836 if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') ||
837 (get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') || 837 (get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') ||
838 (get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) { 838 (get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) {
839 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (no vorbis signature). \n"); 839 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (no vorbis signature). \n");
840 return 1; 840 return -1;
841 } 841 }
842 842
843 if (vorbis_parse_setup_hdr_codebooks(vc)) { 843 if (vorbis_parse_setup_hdr_codebooks(vc)) {
844 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (codebooks). \n"); 844 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (codebooks). \n");
845 return 2; 845 return -2;
846 } 846 }
847 if (vorbis_parse_setup_hdr_tdtransforms(vc)) { 847 if (vorbis_parse_setup_hdr_tdtransforms(vc)) {
848 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (time domain transforms). \n"); 848 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (time domain transforms). \n");
849 return 3; 849 return -3;
850 } 850 }
851 if (vorbis_parse_setup_hdr_floors(vc)) { 851 if (vorbis_parse_setup_hdr_floors(vc)) {
852 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (floors). \n"); 852 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (floors). \n");
853 return 4; 853 return -4;
854 } 854 }
855 if (vorbis_parse_setup_hdr_residues(vc)) { 855 if (vorbis_parse_setup_hdr_residues(vc)) {
856 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (residues). \n"); 856 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (residues). \n");
857 return 5; 857 return -5;
858 } 858 }
859 if (vorbis_parse_setup_hdr_mappings(vc)) { 859 if (vorbis_parse_setup_hdr_mappings(vc)) {
860 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (mappings). \n"); 860 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (mappings). \n");
861 return 6; 861 return -6;
862 } 862 }
863 if (vorbis_parse_setup_hdr_modes(vc)) { 863 if (vorbis_parse_setup_hdr_modes(vc)) {
864 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (modes). \n"); 864 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (modes). \n");
865 return 7; 865 return -7;
866 } 866 }
867 if (!get_bits1(gb)) { 867 if (!get_bits1(gb)) {
868 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (framing flag). \n"); 868 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis setup header packet corrupt (framing flag). \n");
869 return 8; // framing flag bit unset error 869 return -8; // framing flag bit unset error
870 } 870 }
871 871
872 return 0; 872 return 0;
873 } 873 }
874 874
880 880
881 if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') || 881 if ((get_bits(gb, 8)!='v') || (get_bits(gb, 8)!='o') ||
882 (get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') || 882 (get_bits(gb, 8)!='r') || (get_bits(gb, 8)!='b') ||
883 (get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) { 883 (get_bits(gb, 8)!='i') || (get_bits(gb, 8)!='s')) {
884 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (no vorbis signature). \n"); 884 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (no vorbis signature). \n");
885 return 1; 885 return -1;
886 } 886 }
887 887
888 vc->version=get_bits_long(gb, 32); //FIXME check 0 888 vc->version=get_bits_long(gb, 32); //FIXME check 0
889 vc->audio_channels=get_bits(gb, 8); 889 vc->audio_channels=get_bits(gb, 8);
890 if(vc->audio_channels <= 0){ 890 if(vc->audio_channels <= 0){
903 bl1=get_bits(gb, 4); 903 bl1=get_bits(gb, 4);
904 vc->blocksize[0]=(1<<bl0); 904 vc->blocksize[0]=(1<<bl0);
905 vc->blocksize[1]=(1<<bl1); 905 vc->blocksize[1]=(1<<bl1);
906 if (bl0>13 || bl0<6 || bl1>13 || bl1<6 || bl1<bl0) { 906 if (bl0>13 || bl0<6 || bl1>13 || bl1<6 || bl1<bl0) {
907 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (illegal blocksize). \n"); 907 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (illegal blocksize). \n");
908 return 3; 908 return -3;
909 } 909 }
910 // output format int16 910 // output format int16
911 if (vc->blocksize[1]/2 * vc->audio_channels * 2 > 911 if (vc->blocksize[1]/2 * vc->audio_channels * 2 >
912 AVCODEC_MAX_AUDIO_FRAME_SIZE) { 912 AVCODEC_MAX_AUDIO_FRAME_SIZE) {
913 av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis channel count makes " 913 av_log(vc->avccontext, AV_LOG_ERROR, "Vorbis channel count makes "
914 "output packets too large.\n"); 914 "output packets too large.\n");
915 return 4; 915 return -4;
916 } 916 }
917 vc->win[0]=ff_vorbis_vwin[bl0-6]; 917 vc->win[0]=ff_vorbis_vwin[bl0-6];
918 vc->win[1]=ff_vorbis_vwin[bl1-6]; 918 vc->win[1]=ff_vorbis_vwin[bl1-6];
919 919
920 if ((get_bits1(gb)) == 0) { 920 if ((get_bits1(gb)) == 0) {
921 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (framing flag not set). \n"); 921 av_log(vc->avccontext, AV_LOG_ERROR, " Vorbis id header packet corrupt (framing flag not set). \n");
922 return 2; 922 return -2;
923 } 923 }
924 924
925 vc->channel_residues= av_malloc((vc->blocksize[1]/2)*vc->audio_channels * sizeof(float)); 925 vc->channel_residues= av_malloc((vc->blocksize[1]/2)*vc->audio_channels * sizeof(float));
926 vc->channel_floors = av_malloc((vc->blocksize[1]/2)*vc->audio_channels * sizeof(float)); 926 vc->channel_floors = av_malloc((vc->blocksize[1]/2)*vc->audio_channels * sizeof(float));
927 vc->saved = av_mallocz((vc->blocksize[1]/4)*vc->audio_channels * sizeof(float)); 927 vc->saved = av_mallocz((vc->blocksize[1]/4)*vc->audio_channels * sizeof(float));
1406 return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 1); 1406 return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 1);
1407 else if (vr->type==0) 1407 else if (vr->type==0)
1408 return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 0); 1408 return vorbis_residue_decode_internal(vc, vr, ch, do_not_decode, vec, vlen, 0);
1409 else { 1409 else {
1410 av_log(vc->avccontext, AV_LOG_ERROR, " Invalid residue type while residue decode?! \n"); 1410 av_log(vc->avccontext, AV_LOG_ERROR, " Invalid residue type while residue decode?! \n");
1411 return 1; 1411 return -1;
1412 } 1412 }
1413 } 1413 }
1414 1414
1415 void vorbis_inverse_coupling(float *mag, float *ang, int blocksize) 1415 void vorbis_inverse_coupling(float *mag, float *ang, int blocksize)
1416 { 1416 {