From 3143fe34f622ae61ca75a65feba3a8f1a497567e Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Tue, 16 Oct 2018 22:01:26 +0100 Subject: cbs_h264: Actually decompose end-of-sequence NAL units 64c50c0e978cd556dc2da238dfe0bb367e7c1ab9 declared support for decomposing them but omitted to implement it; this adds an implementation. Also do the same for end-of-stream NAL units, since they are equivalent. --- libavcodec/cbs_h264_syntax_template.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libavcodec/cbs_h264_syntax_template.c') diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c index 1c8d7d5eae..1a9fb9cfeb 100644 --- a/libavcodec/cbs_h264_syntax_template.c +++ b/libavcodec/cbs_h264_syntax_template.c @@ -1375,3 +1375,21 @@ static int FUNC(filler)(CodedBitstreamContext *ctx, RWContext *rw, return 0; } + +static int FUNC(end_of_sequence)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawNALUnitHeader *current) +{ + HEADER("End of Sequence"); + + return FUNC(nal_unit_header)(ctx, rw, current, + 1 << H264_NAL_END_SEQUENCE); +} + +static int FUNC(end_of_stream)(CodedBitstreamContext *ctx, RWContext *rw, + H264RawNALUnitHeader *current) +{ + HEADER("End of Stream"); + + return FUNC(nal_unit_header)(ctx, rw, current, + 1 << H264_NAL_END_STREAM); +} -- cgit v1.2.3