[FFmpeg-devel] utils.c audio_frame_size question

Ronald S. Bultje rsbultje
Sat Jun 28 21:16:20 CEST 2008


Hi,

in utils.c:

static int get_audio_frame_size(AVCodecContext *enc, int size)
{
    int frame_size;

    if(enc->codec_id == CODEC_ID_VORBIS)
        return -1;

[etc.]

Later, in has_codec_parameters():

static int has_codec_parameters(AVCodecContext *enc)
{
    int val;
    switch(enc->codec_type) {
    case CODEC_TYPE_AUDIO:
        val = enc->sample_rate && enc->channels;
        if(!enc->frame_size &&
           (enc->codec_id == CODEC_ID_VORBIS ||
            enc->codec_id == CODEC_ID_AAC))
            return 0;
        break;

Isn't that counterintuitive? Shouldn't it be !(codec_id == VORBIS ||
AAC)? Seems like it'd never work for AAC/VORBIS (I'm indeed having a
problem, for AAC in this case).

Ronald




More information about the ffmpeg-devel mailing list