# HG changeset patch # User michael # Date 1115557486 0 # Node ID ab7bd4722cef09bf7845702ba46b7b3314b2f79a # Parent ec2b0cba67641718ba1745edae6d0a194566e35b fix block corruption caused by clear_blocks() optimization diff -r ec2b0cba6764 -r ab7bd4722cef wmv2.c --- a/wmv2.c Sun May 08 09:58:41 2005 +0000 +++ b/wmv2.c Sun May 08 13:04:46 2005 +0000 @@ -587,11 +587,10 @@ 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 @@ 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){