Commit 9c4978ec authored by michael's avatar michael

fix the case where all vlc codes are 8 bits long (repeat=256)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2374 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3a61bd18
...@@ -438,14 +438,13 @@ static void store_table(HYuvContext *s, uint8_t *len){ ...@@ -438,14 +438,13 @@ static void store_table(HYuvContext *s, uint8_t *len){
int index= s->avctx->extradata_size; int index= s->avctx->extradata_size;
for(i=0; i<256;){ for(i=0; i<256;){
int cur=i;
int val= len[i]; int val= len[i];
int repeat; int repeat=0;
for(; i<256 && len[i]==val; i++); for(; i<256 && len[i]==val && repeat<255; i++)
repeat++;
repeat= i - cur;
assert(val < 32 && val >0 && repeat<256 && repeat>0);
if(repeat>7){ if(repeat>7){
((uint8_t*)s->avctx->extradata)[index++]= val; ((uint8_t*)s->avctx->extradata)[index++]= val;
((uint8_t*)s->avctx->extradata)[index++]= repeat; ((uint8_t*)s->avctx->extradata)[index++]= repeat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment