提交 205c1368 编写于 作者: M Michael Niedermayer

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

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 cdced09e
...@@ -188,8 +188,12 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l ...@@ -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 if(i>=length-1){ //no escaped 0
*dst_length= length; *dst_length= length;
*consumed= length+1; //+1 for the header *consumed= length+1; //+1 for the header
memcpy(dst, src, length); if(h->s.avctx->flags2 & CODEC_FLAG2_FAST){
return dst; return src;
}else{
memcpy(dst, src, length);
return dst;
}
} }
//printf("decoding esc\n"); //printf("decoding esc\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册