[x265] [PATCH] frameencoder: fix for crash in frameencoder when AccessUnitDelimiter is on
albert.j.wang at gmail.com
albert.j.wang at gmail.com
Tue Jul 29 06:28:27 CEST 2014
# HG changeset patch
# User Albert Wang
# Date 1406607371 -28800
# Tue Jul 29 12:16:11 2014 +0800
# Node ID 5a49a15f08b8ff1fcf2d6f30c043de0c721c9a4f
# Parent e84b28132be1b7a558bb4d9f7e4979f64c8b2029
frameencoder: fix for crash in frameencoder when AccessUnitDelimiter is on
The m_entropyCoder need to set the bitstream first before calling codeAUD,
otherwise a crash will happen.
diff -r e84b28132be1 -r 5a49a15f08b8 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Jul 28 17:26:13 2014 -0500
+++ b/source/encoder/frameencoder.cpp Tue Jul 29 12:16:11 2014 +0800
@@ -163,6 +163,7 @@
if (m_param->bEnableAccessUnitDelimiters && (m_frame->getPOC() || m_param->bRepeatHeaders))
{
m_bs.resetBits();
+ m_entropyCoder.setBitstream(&m_bs);
m_entropyCoder.codeAUD(slice);
m_bs.writeByteAlignment();
m_nalList.serialize(NAL_UNIT_ACCESS_UNIT_DELIMITER, m_bs);
More information about the x265-devel
mailing list