summaryrefslogtreecommitdiff
path: root/libavcodec/truemotion1.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-06-11 02:24:08 +0000
committerMike Melanson <mike@multimedia.cx>2004-06-11 02:24:08 +0000
commit364ec9dcb6760ae86b1efb418f6cab16cd629da1 (patch)
tree2045673965155bdd7707706033f877afe861c0d9 /libavcodec/truemotion1.c
parentae1dbde1cf6a9a96d802dc38b6741824857b24c5 (diff)
fix initialization bug in which execution overwrites essential data
tables which causes trouble on subsequent runs if decoder is not disposed first Originally committed as revision 3214 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/truemotion1.c')
-rw-r--r--libavcodec/truemotion1.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index b742d80be4..5f32227feb 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -62,10 +62,10 @@ typedef struct TrueMotion1Context {
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 @@ static void select_delta_tables(TrueMotion1Context *s, int delta_table_index)
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 */