Revision 9062cd35

View differences:

libavcodec/vorbis_dec.c
848 848
    }
849 849

  
850 850
    vc->version=get_bits_long(gb, 32);    //FIXME check 0
851
    vc->audio_channels=get_bits(gb, 8);   //FIXME check >0
852
    vc->audio_samplerate=get_bits_long(gb, 32);   //FIXME check >0
851
    vc->audio_channels=get_bits(gb, 8);
852
    if(vc->audio_channels <= 0){
853
        av_log(vc->avccontext, AV_LOG_ERROR, "Invalid number of channels\n");
854
        return -1;
855
    }
856
    vc->audio_samplerate=get_bits_long(gb, 32);
857
    if(vc->audio_samplerate <= 0){
858
        av_log(vc->avccontext, AV_LOG_ERROR, "Invalid samplerate\n");
859
        return -1;
860
    }
853 861
    vc->bitrate_maximum=get_bits_long(gb, 32);
854 862
    vc->bitrate_nominal=get_bits_long(gb, 32);
855 863
    vc->bitrate_minimum=get_bits_long(gb, 32);

Also available in: Unified diff