# HG changeset patch # User melanson # Date 1086920648 0 # Node ID 95d303a305d251a26554ca833dd191ace7c0f532 # Parent c200977cdf78d1653b0f1eb232ef44f5a092674d fix initialization bug in which execution overwrites essential data tables which causes trouble on subsequent runs if decoder is not disposed first diff -r c200977cdf78 -r 95d303a305d2 truemotion1.c --- a/truemotion1.c Thu Jun 10 22:56:43 2004 +0000 +++ b/truemotion1.c Fri Jun 11 02:24:08 2004 +0000 @@ -62,10 +62,10 @@ int block_width; int block_height; - int16_t *ydt; - int16_t *cdt; - int16_t *fat_ydt; - int16_t *fat_cdt; + int16_t ydt[8]; + int16_t cdt[8]; + int16_t fat_ydt[8]; + int16_t fat_cdt[8]; int last_deltaset, last_vectable; @@ -146,10 +146,10 @@ if (delta_table_index > 3) return; - s->ydt = ydts[delta_table_index]; - s->cdt = cdts[delta_table_index]; - s->fat_ydt = fat_ydts[delta_table_index]; - s->fat_cdt = fat_cdts[delta_table_index]; + memcpy(s->ydt, ydts[delta_table_index], 8 * sizeof(int16_t)); + memcpy(s->cdt, cdts[delta_table_index], 8 * sizeof(int16_t)); + memcpy(s->fat_ydt, fat_ydts[delta_table_index], 8 * sizeof(int16_t)); + memcpy(s->fat_cdt, fat_cdts[delta_table_index], 8 * sizeof(int16_t)); /* Y skinny deltas need to be halved for some reason; maybe the * skinny Y deltas should be modified */