]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/binkaudio.c
aac_adtstoasc_bsf: Check extradata memory allocation
[ffmpeg] / libavcodec / binkaudio.c
index 1e34ab95fdcf7018ee34a5df93844c5cd3b6b26e..ffc8f87b138ad1e7e5d89b4f9802a9a3f9d57ea8 100644 (file)
 #include "rdft.h"
 #include "fmtconvert.h"
 #include "internal.h"
+#include "wma_freqs.h"
 #include "libavutil/intfloat.h"
 
-extern const uint16_t ff_wma_critical_freqs[25];
-
 static float quant_table[96];
 
 #define MAX_CHANNELS 2
 #define BINK_BLOCK_MAX_SIZE (MAX_CHANNELS << 11)
 
-typedef struct {
+typedef struct BinkAudioContext {
     GetBitContext gb;
     int version_b;          ///< Bink version 'b'
     int first;
@@ -338,6 +337,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
 
 AVCodec ff_binkaudio_rdft_decoder = {
     .name           = "binkaudio_rdft",
+    .long_name      = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_BINKAUDIO_RDFT,
     .priv_data_size = sizeof(BinkAudioContext),
@@ -345,11 +345,11 @@ AVCodec ff_binkaudio_rdft_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
-    .long_name      = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)")
 };
 
 AVCodec ff_binkaudio_dct_decoder = {
     .name           = "binkaudio_dct",
+    .long_name      = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_BINKAUDIO_DCT,
     .priv_data_size = sizeof(BinkAudioContext),
@@ -357,5 +357,4 @@ AVCodec ff_binkaudio_dct_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
-    .long_name      = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)")
 };