h264: allow disabling bitstream overread protection by using the fast flag.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-09-14 20:48:00 +02:00
parent cdced09ef6
commit 205c13685f
1 changed files with 6 additions and 2 deletions

View File

@ -188,8 +188,12 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l
if(i>=length-1){ //no escaped 0
*dst_length= length;
*consumed= length+1; //+1 for the header
memcpy(dst, src, length);
return dst;
if(h->s.avctx->flags2 & CODEC_FLAG2_FAST){
return src;
}else{
memcpy(dst, src, length);
return dst;
}
}
//printf("decoding esc\n");