[FFmpeg-devel] [PATCH] Decode the audio track of the AVI format that recorded by QNAP surveillance system

Hendrik Leppkes h.leppkes at gmail.com
Tue Jul 17 22:37:14 EEST 2018


On Tue, Jul 17, 2018 at 8:15 PM <archer.chang at gmail.com> wrote:
>
> From: Archer Chang <archerchang at gmail.com>
>
> Some QNAP surveillance system will only change audio type id WAVE_FORMAT_RAW_AAC1
> to 0x0AAC but not audio track itself.
> ---
>  libavformat/riffdec.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
> index b448f91..fe22610 100644
> --- a/libavformat/riffdec.c
> +++ b/libavformat/riffdec.c
> @@ -127,6 +127,8 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
>      if (id == 0xFFFE) {
>          par->codec_tag = 0;
>      } else {
> +        if(id == 0x0AAC)
> +            id = 0x00FF;  /* Change Audio codec id to WAVE_FORMAT_RAW_AAC1 */
>          par->codec_tag = id;
>          par->codec_id  = ff_wav_codec_get_id(id,
>                                               par->bits_per_coded_sample);

This absolutely does not seem like the place to put something like
this. If this is a common tag, maybe it should be added to the riff
tags?

- Hendrik


More information about the ffmpeg-devel mailing list