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

archer.chang at gmail.com archer.chang at gmail.com
Thu Jul 12 15:39:43 EEST 2018


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);
-- 
2.7.4



More information about the ffmpeg-devel mailing list