[x265] [PATCH 3/5] fix crash on all_I_Frame.cfg

Min Chen chenm003 at 163.com
Thu Jun 20 18:53:13 CEST 2013


>From 45fdb9be668922219837c940fa87175d0bc2da4a Mon Sep 17 00:00:00 2001
From: Min Chen <chenm003 at 163.com>
Date: Thu, 20 Jun 2013 16:51:42 +0800
Subject: [PATCH 3/5] fix crash on all_I_Frame.cfg

---
 source/Lib/TLibEncoder/TEncGOP.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/source/Lib/TLibEncoder/TEncGOP.cpp b/source/Lib/TLibEncoder/TEncGOP.cpp
index 254f14d..9e8b114 100644
--- a/source/Lib/TLibEncoder/TEncGOP.cpp
+++ b/source/Lib/TLibEncoder/TEncGOP.cpp
@@ -167,6 +167,9 @@ Void TEncGOP::init(TEncTop* pcTEncTop)
     int maxGOP = m_pcCfg->getIntraPeriod() > 1 ? m_pcCfg->getIntraPeriod() : 1;
     m_recon = new x265_picture_t[maxGOP];
 
+    // TODO: the HM release reference when next frame encode, so I think we need at least 2 buffers
+    if (maxGOP < 2) maxGOP = 2;
+
     // make references to the last N TComPic's recon frames
     for (int i = 0; i < maxGOP; i++)
     {
-- 
1.7.9.msysgit.0




More information about the x265-devel mailing list