From 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sun, 18 Dec 2011 22:42:36 +0100 Subject: h264: skip start code search if the size of the nal unit is known Start code emulation prevention is only required in Annex B bytestream packed NAL units. For other coding formats the size is already known. Looking for a start code prefix can result in false positives like in http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which has a false positive in the SPS. --- libavcodec/h264_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 826c17a0f1..1967eface3 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -144,7 +144,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, src_length = 20; break; } - ptr= ff_h264_decode_nal(h, buf, &dst_length, &consumed, src_length); + ptr= ff_h264_decode_nal(h, buf, &dst_length, &consumed, src_length, 0); if (ptr==NULL || dst_length < 0) break; -- cgit v1.2.3