History

fix order of null pointer protection

huili2 committed 11 years ago

Commit bd8ad201 parent a384df33 files · +5 −5Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+2−2
@@ -1265,8 +1265,6 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 1264 unmodified lines
1265 int8_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]");1265 int8_t) * MB_PARTITION_SIZE, "pCtx->sMb.pSubMbType[]");
1266 pCtx->sMb.pSliceIdc[i] = (int32_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t),1266 pCtx->sMb.pSliceIdc[i] = (int32_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t),
1267 "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/20101267 "pCtx->sMb.pSliceIdc[]"); // using int32_t for slice_idc, 4/21/2010
1268 if (pCtx->sMb.pSliceIdc[i] != NULL)
1269 memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
1270 pCtx->sMb.pResidualPredFlag[i] = (int8_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),1268 pCtx->sMb.pResidualPredFlag[i] = (int8_t*) WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t),
1271 "pCtx->sMb.pResidualPredFlag[]");1269 "pCtx->sMb.pResidualPredFlag[]");
1272 //pCtx->sMb.pMotionPredFlag[i] = (uint8_t *) WelsMallocz(pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof(uint8_t), "pCtx->sMb.pMotionPredFlag[]");1270 //pCtx->sMb.pMotionPredFlag[i] = (uint8_t *) WelsMallocz(pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof(uint8_t), "pCtx->sMb.pMotionPredFlag[]");
@@ -1303,6 +1301,8 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 30 unmodified lines
1303 )1301 )
1304 )1302 )
1305 1303
1304 memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
1305
1306 pCtx->pDqLayersList[i] = pDq;1306 pCtx->pDqLayersList[i] = pDq;
1307 ++ i;1307 ++ i;
1308 } while (i < LAYER_NUM_EXCHANGEABLE);1308 } while (i < LAYER_NUM_EXCHANGEABLE);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t