Skip to content
Snippets Groups Projects
Commit f73f76fd authored by Xi Wang's avatar Xi Wang Committed by Derek Buitenhuis
Browse files

swscale: fix NULL checking in sws_alloc_context()


sws_getCachedContext() and sws_getContext() expect sws_alloc_context()
to return NULL when out of memory, as follows.

    if (!(context = sws_alloc_context()))
        return NULL;

This patch fixes sws_alloc_context() to return NULL in that case.

Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
Signed-off-by: default avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 3b81bba3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment