diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 23:16:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 23:16:49 +0100 |
commit | 464cef4c14a6a550ee30810416d18686b5f3ffa0 (patch) | |
tree | 906af3c9685883fb966b8d95f2e416e68b9fee36 /libavcodec/wmavoice.c | |
parent | 9759d2b886057b90355716edb23262e17f9bc3f9 (diff) | |
parent | 5023b89bba198b2f8e43b7f555aeb9c30d33db9f (diff) | |
download | ffmpeg-464cef4c14a6a550ee30810416d18686b5f3ffa0.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
xwma: Validate channels and bits_per_coded_sample.
mov: Do not read past the end of the ctts_data table.
mov: Add missing terminator to mov_ch_layout_map_1ch.
asf: reset side data elements on packet copy.
wmavoice: fix stack overread.
wmalossless: error out if a subframe is not used by any channel.
vqa: check palette chunk size before reading data.
wmalossless: reset sample pointer for each subframe.
wmalossless: error out on invalid values for order.
Conflicts:
libavcodec/vqavideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r-- | libavcodec/wmavoice.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index d4b7a3e1cd..66c0ce40d3 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1440,8 +1440,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx, int pitch[MAX_BLOCKS], last_block_pitch; /* Parse frame type ("frame header"), see frame_descs */ - int bd_idx = s->vbm_tree[get_vlc2(gb, frame_type_vlc.table, 6, 3)], - block_nsamples = MAX_FRAMESIZE / frame_descs[bd_idx].n_blocks; + int bd_idx = s->vbm_tree[get_vlc2(gb, frame_type_vlc.table, 6, 3)], block_nsamples; if (bd_idx < 0) { av_log(ctx, AV_LOG_ERROR, @@ -1449,6 +1448,8 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx, return -1; } + block_nsamples = MAX_FRAMESIZE / frame_descs[bd_idx].n_blocks; + /* Pitch calculation for ACB_TYPE_ASYMMETRIC ("pitch-per-frame") */ if (frame_descs[bd_idx].acb_type == ACB_TYPE_ASYMMETRIC) { /* Pitch is provided per frame, which is interpreted as the pitch of |