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/pic_queue.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/core/src/pic_queue.cpp+2−2
@@ -90,9 +90,9 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 89 unmodified lines
90 } else {90 } else {
91 pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */91 pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
92 + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));92 + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
93 memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
94
95 WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pBuffer[0], FreePicture (pPic));93 WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pBuffer[0], FreePicture (pPic));
94
95 memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
96 pPic->iLinesize[0] = iPicWidth;96 pPic->iLinesize[0] = iPicWidth;
97 pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth;97 pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth;
98 pPic->pBuffer[1] = pPic->pBuffer[0] + iLumaSize;98 pPic->pBuffer[1] = pPic->pBuffer[0] + iLumaSize;

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