[FFmpeg-devel] [PATCH 1/3] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header

Lynne dev at lynne.ee
Thu Jan 28 17:42:57 EET 2021


Jan 28, 2021, 16:08 by nachiket.programmer at gmail.com:

> These will be used by HLS demuxer in case of SAMPLE-AES decryption.
>
> Signed-off-by: Nachiket Tarate <nachiket.programmer at gmail.com>
> ---
>  libavcodec/adts_header.c |  1 +
>  libavcodec/adts_header.h | 14 ++++++++++++++
>  libavcodec/adts_parser.c | 28 ++++++++++++++++++++++++++++
>  3 files changed, 43 insertions(+)
>
> diff --git a/libavcodec/adts_header.c b/libavcodec/adts_header.c
> index 0889820f8a..c6680b0fc8 100644
> --- a/libavcodec/adts_header.c
> +++ b/libavcodec/adts_header.c
> @@ -66,6 +66,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
>  hdr->sample_rate    = avpriv_mpeg4audio_sample_rates[sr];
>  hdr->samples        = (rdb + 1) * 1024;
>  hdr->bit_rate       = size * 8 * hdr->sample_rate / hdr->samples;
> +    hdr->frame_length	= size;
>

Everything is neatly aligned. Everything but the one line you changed...


More information about the ffmpeg-devel mailing list