From b3f3a9eae6571601676779cbaf3a7ca95f5b24af Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 25 Aug 2020 15:30:21 +0300 Subject: [PATCH] Add two EOS NAL units at the end of each picture to make intra sequence work --- src/encoder_state-bitstream.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/encoder_state-bitstream.c b/src/encoder_state-bitstream.c index da7aebca..1c7cf0eb 100644 --- a/src/encoder_state-bitstream.c +++ b/src/encoder_state-bitstream.c @@ -1449,6 +1449,10 @@ static void encoder_state_write_bitstream_main(encoder_state_t * const state) add_checksum(state); } + kvz_nal_write(stream, KVZ_NAL_EOS_NUT, 0, 1); + kvz_nal_write(stream, KVZ_NAL_EOS_NUT, 0, 1); + + //Get bitstream length for stats uint64_t newpos = kvz_bitstream_tell(stream); state->stats_bitstream_length = (newpos >> 3) - (curpos >> 3);