Mercurial > libavcodec.hg
comparison faac.c @ 3099:a2a116fee880 libavcodec
create adts stream if CODEC_FLAG_GLOBAL_HEADER not set
| author | mru |
|---|---|
| date | Wed, 08 Feb 2006 01:10:07 +0000 |
| parents | 0b546eab515d |
| children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
| 3098:eb3d3988aff2 | 3099:a2a116fee880 |
|---|---|
| 60 faac_cfg->bandWidth = avctx->cutoff; | 60 faac_cfg->bandWidth = avctx->cutoff; |
| 61 if(avctx->flags & CODEC_FLAG_QSCALE) { | 61 if(avctx->flags & CODEC_FLAG_QSCALE) { |
| 62 faac_cfg->bitRate = 0; | 62 faac_cfg->bitRate = 0; |
| 63 faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA; | 63 faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA; |
| 64 } | 64 } |
| 65 faac_cfg->outputFormat = 0; | 65 faac_cfg->outputFormat = 1; |
| 66 faac_cfg->inputFormat = FAAC_INPUT_16BIT; | 66 faac_cfg->inputFormat = FAAC_INPUT_16BIT; |
| 67 | |
| 68 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { | |
| 69 av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); | |
| 70 return -1; | |
| 71 } | |
| 72 | 67 |
| 73 avctx->frame_size = samples_input / avctx->channels; | 68 avctx->frame_size = samples_input / avctx->channels; |
| 74 | 69 |
| 75 avctx->coded_frame= avcodec_alloc_frame(); | 70 avctx->coded_frame= avcodec_alloc_frame(); |
| 76 avctx->coded_frame->key_frame= 1; | 71 avctx->coded_frame->key_frame= 1; |
| 84 | 79 |
| 85 if (!faacEncGetDecoderSpecificInfo(s->faac_handle, &buffer, | 80 if (!faacEncGetDecoderSpecificInfo(s->faac_handle, &buffer, |
| 86 &decoder_specific_info_size)) { | 81 &decoder_specific_info_size)) { |
| 87 avctx->extradata = buffer; | 82 avctx->extradata = buffer; |
| 88 avctx->extradata_size = decoder_specific_info_size; | 83 avctx->extradata_size = decoder_specific_info_size; |
| 84 faac_cfg->outputFormat = 0; | |
| 89 } | 85 } |
| 86 } | |
| 87 | |
| 88 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { | |
| 89 av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); | |
| 90 return -1; | |
| 90 } | 91 } |
| 91 | 92 |
| 92 return 0; | 93 return 0; |
| 93 } | 94 } |
| 94 | 95 |
