Commit 233342af authored by mru's avatar mru

create adts stream if CODEC_FLAG_GLOBAL_HEADER not set


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4956 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 12e869f0
...@@ -62,14 +62,9 @@ static int Faac_encode_init(AVCodecContext *avctx) ...@@ -62,14 +62,9 @@ static int Faac_encode_init(AVCodecContext *avctx)
faac_cfg->bitRate = 0; faac_cfg->bitRate = 0;
faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA; faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA;
} }
faac_cfg->outputFormat = 0; faac_cfg->outputFormat = 1;
faac_cfg->inputFormat = FAAC_INPUT_16BIT; 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->frame_size = samples_input / avctx->channels;
avctx->coded_frame= avcodec_alloc_frame(); avctx->coded_frame= avcodec_alloc_frame();
...@@ -86,9 +81,15 @@ static int Faac_encode_init(AVCodecContext *avctx) ...@@ -86,9 +81,15 @@ static int Faac_encode_init(AVCodecContext *avctx)
&decoder_specific_info_size)) { &decoder_specific_info_size)) {
avctx->extradata = buffer; avctx->extradata = buffer;
avctx->extradata_size = decoder_specific_info_size; 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment