Message ID | 1531399183-20622-1-git-send-email-archerchang@gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Jul 17, 2018 at 8:15 PM <archer.chang@gmail.com> wrote: > > From: Archer Chang <archerchang@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
2018-07-12 14:39 GMT+02:00, archer.chang@gmail.com <archer.chang@gmail.com>: > From: Archer Chang <archerchang@gmail.com> > > Some QNAP surveillance system will only change audio type id > WAVE_FORMAT_RAW_AAC1 > to 0x0AAC but not audio track itself. Please provide a sample. Thank you, Carl Eugen
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);
From: Archer Chang <archerchang@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(+)