Browse Source

fixing h263+ slices if the padding at the end of the frame is >7 && <16 && there are no zero bytes afterwards

Originally committed as revision 1281 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 23 years ago
parent
commit
e4828c7d43
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      libavcodec/h263.c

+ 7
- 7
libavcodec/h263.c View File

@@ -3292,14 +3292,14 @@ end:
return SLICE_END;
}
}else{
if(get_bits_count(&s->gb) + 7 >= s->gb.size*8){
int v= show_bits(&s->gb, 8) >> (((get_bits_count(&s->gb)-1)&7)+1);
if(v==0)
return SLICE_END;
}else{
if(show_bits(&s->gb, 16)==0)
return SLICE_END;
int v= show_bits(&s->gb, 16);
if(get_bits_count(&s->gb) + 16 > s->gb.size*8){
v>>= get_bits_count(&s->gb) + 16 - s->gb.size*8;
}

if(v==0)
return SLICE_END;
}

return SLICE_OK;


Loading…
Cancel
Save