[FFmpeg-devel] [PATCH 2/4] aacenc: add recognized profiles array

Anssi Hannula anssi.hannula
Thu Jan 27 18:20:47 CET 2011


On 22.01.2011 02:28, Ronald S. Bultje wrote:
> Hi,
> 
> On Fri, Jan 21, 2011 at 5:58 PM, Anssi Hannula <anssi.hannula at iki.fi> wrote:
>> ---
>>  libavcodec/aacenc.c |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
>> index c52ffa0..2903e9d 100644
>> --- a/libavcodec/aacenc.c
>> +++ b/libavcodec/aacenc.c
>> @@ -636,6 +636,11 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
>>     return 0;
>>  }
>>
>> +static const AVProfile profiles[] = {
>> +    { FF_PROFILE_AAC_LOW,  "LC"   },
>> +    { FF_PROFILE_UNKNOWN },
>> +};
>> +
>>  AVCodec aac_encoder = {
>>     "aac",
>>     AVMEDIA_TYPE_AUDIO,
>> @@ -647,4 +652,5 @@ AVCodec aac_encoder = {
>>     .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
>>     .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
>>     .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
>> +    .profiles = NULL_IF_CONFIG_SMALL(profiles),
>>  };
>> --
>> 1.7.3
> 
> Given the preceeding discussion, this is probably OK now. The value
> "unknown" is also valid in _init(), so you either want to remove that
> or set it to LOW if it's UNKNOWN, right? Otherwise the value isn't
> displayed if not explicitly set to LOW, even though it always outputs
> LOW.

Probably indeed best to to set it to LOW in _init() if it is set to
UNKNOWN, I guess.

-- 
Anssi Hannula



More information about the ffmpeg-devel mailing list