diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-05-08 13:04:46 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-08 13:04:46 +0000 |
commit | 1c02a9732aa2e5ec0eaf83e65044704af05e8400 (patch) | |
tree | 7c6ef3a7dd44fd45ce8788dc8d5174545e7be5ed /libavcodec/wmv2.c | |
parent | 6b51185c63fd70e342ce3d2979c556cda92ee564 (diff) | |
download | ffmpeg-1c02a9732aa2e5ec0eaf83e65044704af05e8400.tar.gz |
fix block corruption caused by clear_blocks() optimization
Originally committed as revision 4202 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r-- | libavcodec/wmv2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 949d7c6409..cbe5de2154 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -587,11 +587,10 @@ static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n, static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ MpegEncContext * const s= &w->s; + if (s->block_last_index[n] >= 0) { switch(w->abt_type_table[n]){ case 0: - if (s->block_last_index[n] >= 0) { - s->dsp.idct_add (dst, stride, block1); - } + s->dsp.idct_add (dst, stride, block1); break; case 1: simple_idct84_add(dst , stride, block1); @@ -606,6 +605,7 @@ static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int st default: av_log(s->avctx, AV_LOG_ERROR, "internal error in WMV2 abt\n"); } + } } void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block1[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr){ |