summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/binkaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/libavcodec/binkaudio.c')
-rw-r--r--ffmpeg/libavcodec/binkaudio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ffmpeg/libavcodec/binkaudio.c b/ffmpeg/libavcodec/binkaudio.c
index ef5569a..8db4533 100644
--- a/ffmpeg/libavcodec/binkaudio.c
+++ b/ffmpeg/libavcodec/binkaudio.c
@@ -36,10 +36,9 @@
#include "rdft.h"
#include "fmtconvert.h"
#include "internal.h"
+#include "wma.h"
#include "libavutil/intfloat.h"
-extern const uint16_t ff_wma_critical_freqs[25];
-
static float quant_table[96];
#define MAX_CHANNELS 2
@@ -309,7 +308,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
return AVERROR(ENOMEM);
s->packet_buffer = buf;
memcpy(s->packet_buffer, avpkt->data, avpkt->size);
- init_get_bits(gb, s->packet_buffer, avpkt->size * 8);
+ if ((ret = init_get_bits8(gb, s->packet_buffer, avpkt->size)) < 0)
+ return ret;
consumed = avpkt->size;
/* skip reported size */
@@ -336,6 +336,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),
@@ -343,11 +344,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),
@@ -355,5 +356,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)")
};