Commit 36be045e authored by Reimar Döffinger's avatar Reimar Döffinger

Support "VLB " audio in NSV files.

See samples/nsv/vlb_audio.
Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 16b771b1
...@@ -300,6 +300,7 @@ typedef struct { ...@@ -300,6 +300,7 @@ typedef struct {
DECLARE_ALIGNED(32, float, temp)[128]; DECLARE_ALIGNED(32, float, temp)[128];
enum OCStatus output_configured; enum OCStatus output_configured;
int warned_num_aac_frames;
} AACContext; } AACContext;
#endif /* AVCODEC_AAC_H */ #endif /* AVCODEC_AAC_H */
...@@ -2125,13 +2125,14 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb) ...@@ -2125,13 +2125,14 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
} }
if (!ac->avctx->sample_rate) if (!ac->avctx->sample_rate)
ac->avctx->sample_rate = hdr_info.sample_rate; ac->avctx->sample_rate = hdr_info.sample_rate;
if (hdr_info.num_aac_frames == 1) { if (!ac->warned_num_aac_frames && hdr_info.num_aac_frames != 1) {
if (!hdr_info.crc_absent) // This is 2 for "VLB " audio in NSV files.
skip_bits(gb, 16); // See samples/nsv/vlb_audio.
} else {
av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame is", 0); av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame is", 0);
return -1; ac->warned_num_aac_frames = 1;
} }
if (!hdr_info.crc_absent)
skip_bits(gb, 16);
} }
return size; return size;
} }
......
...@@ -206,6 +206,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = { ...@@ -206,6 +206,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = {
{ CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') }, { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
{ CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') }, { CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },
{ CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') }, { CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') },
{ CODEC_ID_AAC, MKTAG('V', 'L', 'B', ' ') },
{ CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') }, { CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') },
{ CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') }, { CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },
{ CODEC_ID_NONE, 0 }, { CODEC_ID_NONE, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment