diff options
author | Janne Grunau <janne-libav@jannau.net> | 2011-12-18 22:42:36 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-12-18 23:52:53 +0100 |
commit | 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b (patch) | |
tree | c0640de45934f4262cca34dc6cfe009fd8a8a606 /libavcodec/h264.h | |
parent | 2e7905eee8d0f8813e703cacdd7b3ffdc4960656 (diff) | |
download | ffmpeg-87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.tar.gz |
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.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r-- | libavcodec/h264.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 50255389fa..24da4f5eac 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -610,9 +610,12 @@ int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length); * @param consumed is the number of bytes used as input * @param length is the length of the array * @param dst_length is the number of decoded bytes FIXME here or a decode rbsp tailing? + * @param nalsize_known skip start code search if the size of the nalu is known * @return decoded bytes, might be src+1 if no escapes */ -const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length); +const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, + int *dst_length, int *consumed, int length, + int nalsize_known); /** * Free any data that may have been allocated in the H264 context like SPS, PPS etc. |