[FFmpeg-cvslog] Support "VLB " audio in NSV files.

Reimar Döffinger git at videolan.org
Tue Dec 13 23:08:54 CET 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sun Dec 11 17:37:40 2011 +0100| [36be045ed7942e07742c3cf3d3012b1d2a9ec344] | committer: Reimar Döffinger

Support "VLB " audio in NSV files.

See samples/nsv/vlb_audio.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=36be045ed7942e07742c3cf3d3012b1d2a9ec344
---

 libavcodec/aac.h     |    1 +
 libavcodec/aacdec.c  |   11 ++++++-----
 libavformat/nsvdec.c |    1 +
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index d311036..631fdd4 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -300,6 +300,7 @@ typedef struct {
     DECLARE_ALIGNED(32, float, temp)[128];
 
     enum OCStatus output_configured;
+    int warned_num_aac_frames;
 } AACContext;
 
 #endif /* AVCODEC_AAC_H */
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a046d99..2b2ae8a 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2125,13 +2125,14 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
         }
         if (!ac->avctx->sample_rate)
             ac->avctx->sample_rate = hdr_info.sample_rate;
-        if (hdr_info.num_aac_frames == 1) {
-            if (!hdr_info.crc_absent)
-                skip_bits(gb, 16);
-        } else {
+        if (!ac->warned_num_aac_frames && hdr_info.num_aac_frames != 1) {
+            // This is 2 for "VLB " audio in NSV files.
+            // See samples/nsv/vlb_audio.
             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;
 }
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 9da036e..72d626a 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -206,6 +206,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = {
     { CODEC_ID_MP3,       MKTAG('M', 'P', '3', ' ') },
     { CODEC_ID_AAC,       MKTAG('A', 'A', 'C', ' ') },
     { CODEC_ID_AAC,       MKTAG('A', 'A', 'C', 'P') },
+    { CODEC_ID_AAC,       MKTAG('V', 'L', 'B', ' ') },
     { CODEC_ID_SPEEX,     MKTAG('S', 'P', 'X', ' ') },
     { CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },
     { CODEC_ID_NONE,      0 },



More information about the ffmpeg-cvslog mailing list