changeset 12600:0af31fef64a7 Release_3.2

Fix segmentation fault with svt enabled build and modify library install path This commit 1. Fixes segmentation fault on running x265 encodes via svt integrated build. 2. Modifies library install path of SVT from bin to library folder.
author Snehaa Giridharan <snehaa@multicorewareinc.com>
date Tue, 07 Jan 2020 19:10:59 +0530
parents 09b4f94dba5a
children
files source/CMakeLists.txt source/encoder/api.cpp
diffstat 2 files changed, 5 insertions(+-), 5 deletions(-) [+]
line wrap: on
line diff
--- a/source/CMakeLists.txt	Wed Dec 11 16:11:24 2019 +0530
+++ b/source/CMakeLists.txt	Tue Jan 07 19:10:59 2020 +0530
@@ -573,7 +573,7 @@ endif()
 if(SVTHEVC_FOUND)
     install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbApi.h" DESTINATION include)
     install(FILES "${SVT_HEVC_INCLUDE_DIR}/EbErrorCodes.h" DESTINATION include)
-    install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${BIN_INSTALL_DIR})
+    install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${LIB_INSTALL_DIR})
 endif()
 
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
--- a/source/encoder/api.cpp	Wed Dec 11 16:11:24 2019 +0530
+++ b/source/encoder/api.cpp	Tue Jan 07 19:10:59 2020 +0530
@@ -372,12 +372,12 @@ int x265_encoder_encode(x265_encoder *en
 
 #ifdef SVT_HEVC
     EB_ERRORTYPE return_error;
-    static unsigned char picSendDone = 0;
-    numEncoded = 0;
-    static int codedNal = 0, eofReached = 0;
-	EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
     if (encoder->m_param->bEnableSvtHevc)
     {
+        static unsigned char picSendDone = 0;
+        numEncoded = 0;
+        static int codedNal = 0, eofReached = 0;
+        EB_H265_ENC_CONFIGURATION* svtParam = (EB_H265_ENC_CONFIGURATION*)encoder->m_svtAppData->svtHevcParams;
         if (pic_in)
         {
             if (pic_in->colorSpace == X265_CSP_I420) // SVT-HEVC supports only yuv420p color space