[libav-devel] [PATCH] libfdk-aac: Use enum names instead of literal numbers for the output format

Luca Barbato lu_zero at gentoo.org
Fri Jul 6 17:04:20 CEST 2018


On 05/07/2018 22:06, Martin Storsjö wrote:
> ---
>  libavcodec/libfdk-aacenc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
> index 26dfb6dc0b..c340a1e3e0 100644
> --- a/libavcodec/libfdk-aacenc.c
> +++ b/libavcodec/libfdk-aacenc.c
> @@ -227,7 +227,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
>      /* Choose bitstream format - if global header is requested, use
>       * raw access units, otherwise use ADTS. */
>      if ((err = aacEncoder_SetParam(s->handle, AACENC_TRANSMUX,
> -                                   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER ? 0 : s->latm ? 10 : 2)) != AACENC_OK) {
> +                                   avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER ? TT_MP4_RAW :
> +                                   s->latm ? TT_MP4_LOAS : TT_MP4_ADTS)) != AACENC_OK) {
>          av_log(avctx, AV_LOG_ERROR, "Unable to set the transmux format: %s\n",
>                 aac_get_error(err));
>          goto error;
> 

Ok.


More information about the libav-devel mailing list