comparison libswscale/utils.c @ 30822:ed3b3682cdde

Check for allocation failure for c->lumMmx2FilterCode and c->chrMmx2FilterCode.
author reimar
date Mon, 08 Mar 2010 19:41:57 +0000
parents d59dfdf82fca
children e052716dcb5b
comparison
equal deleted inserted replaced
30821:d59dfdf82fca 30822:ed3b3682cdde
966 #else 966 #else
967 c->lumMmx2FilterCode = av_malloc(c->lumMmx2FilterCodeSize); 967 c->lumMmx2FilterCode = av_malloc(c->lumMmx2FilterCodeSize);
968 c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize); 968 c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize);
969 #endif 969 #endif
970 970
971 if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
972 goto fail;
971 FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail); 973 FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), fail);
972 FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail); 974 FF_ALLOCZ_OR_GOTO(c, c->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail);
973 FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail); 975 FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail);
974 FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW/2/4+8)*sizeof(int32_t), fail); 976 FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW/2/4+8)*sizeof(int32_t), fail);
975 977