Commit 527bf4bb authored by reimar's avatar reimar

Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@30864 b3059339-0415-0410-9bf9-f77b7e298cf2
parent deee49f8
......@@ -968,6 +968,8 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize);
#endif
if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
goto fail;
FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail);
FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail);
FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment