mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-20 08:15:06 +02:00
fix the case where all vlc codes are 8 bits long (repeat=256)
Originally committed as revision 2374 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7674347b64
commit
a003ee9a44
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user