ref: 2c7857ab53dc4c946a9922a456ba5ff5b220b7dc
parent: 4ecdd071ffaaff2cd166e400ec962220b3f32266
parent: 11c7bfa098ddd3a1aa482e8e4f02dfcd701f41fa
author: huili2 <huili2@cisco.com>
date: Fri Jul 17 06:46:03 EDT 2015
Merge pull request #2038 from HaiboZhu/Bugfix_disable_redundant_picture [Decoder bug fix] Disable redundant picture to avoid the memory overflow
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -857,6 +857,10 @@
WELS_CHECK_SE_UPPER_ERROR (uiCode, SLICE_HEADER_REDUNDANT_PIC_CNT_MAX, "redundant_pic_cnt",
GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REDUNDANT_PIC_CNT));
pSliceHead->iRedundantPicCnt = uiCode;
+ if (pSliceHead->iRedundantPicCnt > 0) {
+ WelsLog (pLogCtx, WELS_LOG_WARNING, "Redundant picture not supported!");
+ return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_REDUNDANT_PIC_CNT);
+ }
}
//set defaults, might be overriden a few line later