diff options
author | Måns Rullgård <mans@mansr.com> | 2006-02-08 01:10:07 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-02-08 01:10:07 +0000 |
commit | 86db37df520908495da49ac4cfa9dc4474d520bc (patch) | |
tree | 46524b18b87cd71501a70433c059cbcee51c5e8a /libavcodec | |
parent | fda885c70312715184a8b8a00c88f854c5e71021 (diff) | |
download | ffmpeg-86db37df520908495da49ac4cfa9dc4474d520bc.tar.gz |
create adts stream if CODEC_FLAG_GLOBAL_HEADER not set
Originally committed as revision 4956 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/faac.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/faac.c b/libavcodec/faac.c index 9dbc42f6c3..2b7c596784 100644 --- a/libavcodec/faac.c +++ b/libavcodec/faac.c @@ -62,14 +62,9 @@ static int Faac_encode_init(AVCodecContext *avctx) faac_cfg->bitRate = 0; faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA; } - faac_cfg->outputFormat = 0; + faac_cfg->outputFormat = 1; faac_cfg->inputFormat = FAAC_INPUT_16BIT; - if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { - av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); - return -1; - } - avctx->frame_size = samples_input / avctx->channels; avctx->coded_frame= avcodec_alloc_frame(); @@ -86,9 +81,15 @@ static int Faac_encode_init(AVCodecContext *avctx) &decoder_specific_info_size)) { avctx->extradata = buffer; avctx->extradata_size = decoder_specific_info_size; + faac_cfg->outputFormat = 0; } } + if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { + av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); + return -1; + } + return 0; } |