Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-29 17:11:34 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-09-29 17:11:34 +0400
commitb96dc093eaf3adaf5df80559cbbaba00d1708adf (patch)
tree81ed0d099ff08881dde2451de4f5a7b119d272fd /libavcodec/wmalosslessdec.c
parent8672fc7b0453098d862bb1c0caafab4823ee0b4e (diff)
parent065b3a1cfa3f23aedf76244b3f3883ba913173ff (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: wmalosslessdec: increase channel_coeffs/residues size wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14. lagarith: check count before writing zeros. wmaprodec: check num_vec_coeffs for validity avidec: use actually read size instead of requested size avidec: return 0, not packet size from read_packet(). Conflicts: libavcodec/lagarith.c libavcodec/wmalosslessdec.c libavcodec/wmaprodec.c libavformat/avidec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r--libavcodec/wmalosslessdec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 485cab206c..cdd4eb851b 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -23,6 +23,8 @@
*/
#include "libavutil/attributes.h"
+#include "libavutil/avassert.h"
+
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
@@ -38,7 +40,7 @@
#define MAX_ORDER 256
#define WMALL_BLOCK_MIN_BITS 6 ///< log2 of min block size
-#define WMALL_BLOCK_MAX_BITS 12 ///< log2 of max block size
+#define WMALL_BLOCK_MAX_BITS 14 ///< log2 of max block size
#define WMALL_BLOCK_MAX_SIZE (1 << WMALL_BLOCK_MAX_BITS) ///< maximum block size
#define WMALL_BLOCK_SIZES (WMALL_BLOCK_MAX_BITS - WMALL_BLOCK_MIN_BITS + 1) ///< possible block sizes
@@ -213,12 +215,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->len_prefix = s->decode_flags & 0x40;
/* get frame len */
- bits = ff_wma_get_frame_len_bits(avctx->sample_rate, 3, s->decode_flags);
- if (bits > WMALL_BLOCK_MAX_BITS) {
- av_log_missing_feature(avctx, "big-bits block sizes", 1);
- return AVERROR_INVALIDDATA;
- }
- s->samples_per_frame = 1 << bits;
+ s->samples_per_frame = 1 << ff_wma_get_frame_len_bits(avctx->sample_rate,
+ 3, s->decode_flags);
+ av_assert0(s->samples_per_frame <= WMALL_BLOCK_MAX_SIZE);
/* init previous block len */
for (i = 0; i < avctx->channels; i++)