Skip to content
Snippets Groups Projects
Commit 32a92d32 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

sws: Print an error in case of av_malloc() failure

parent 90cad5ed
Branches
Tags
No related merge requests found
...@@ -948,7 +948,10 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter) ...@@ -948,7 +948,10 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
#else #else
if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode) if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
#endif #endif
{
av_log(c, AV_LOG_ERROR, "Failed to allocate MMX2FilterCode\n");
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
}
FF_ALLOCZ_OR_GOTO(c, c->hLumFilter , (dstW /8+8)*sizeof(int16_t), 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->hChrFilter , (c->chrDstW /4+8)*sizeof(int16_t), fail);
FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail); FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW /2/8+8)*sizeof(int32_t), fail);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment