Commit 7be14a0a authored by michaelni's avatar michaelni

fixing h263+ slices if the padding at the end of the frame is >7 && <16 &&...

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1281 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7f567a32
...@@ -3292,14 +3292,14 @@ end: ...@@ -3292,14 +3292,14 @@ end:
return SLICE_END; return SLICE_END;
} }
}else{ }else{
if(get_bits_count(&s->gb) + 7 >= s->gb.size*8){ int v= show_bits(&s->gb, 16);
int v= show_bits(&s->gb, 8) >> (((get_bits_count(&s->gb)-1)&7)+1);
if(v==0) if(get_bits_count(&s->gb) + 16 > s->gb.size*8){
return SLICE_END; v>>= get_bits_count(&s->gb) + 16 - s->gb.size*8;
}else{
if(show_bits(&s->gb, 16)==0)
return SLICE_END;
} }
if(v==0)
return SLICE_END;
} }
return SLICE_OK; return SLICE_OK;
......
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