diff options
author | Hendrik Leppkes | 2015-10-05 11:18:08 +0200 |
---|---|---|
committer | Hendrik Leppkes | 2015-10-05 11:18:08 +0200 |
commit | ac830e9b489b77d42e11599cbaf588139781da73 (patch) | |
tree | 5d936da2d7396a6970c28849c926c10fd0476ef1 /libavcodec | |
parent | a7322bd97f2e6cf1b40e98d0408f77769fb87349 (diff) | |
parent | f3202871598f59b570b31b01cfeb64b8fedbd700 (diff) |
Merge commit 'f3202871598f59b570b31b01cfeb64b8fedbd700'
* commit 'f3202871598f59b570b31b01cfeb64b8fedbd700':
d3d11va: check for malloc failure
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/d3d11va.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/d3d11va.c b/libavcodec/d3d11va.c index 42491e7c8d..7ecda22d37 100644 --- a/libavcodec/d3d11va.c +++ b/libavcodec/d3d11va.c @@ -20,7 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <stddef.h> + #include "config.h" +#include "libavutil/error.h" #include "libavutil/mem.h" #include "d3d11va.h" @@ -28,6 +31,8 @@ AVD3D11VAContext *av_d3d11va_alloc_context(void) { AVD3D11VAContext* res = av_mallocz(sizeof(AVD3D11VAContext)); + if (!res) + return NULL; res->context_mutex = INVALID_HANDLE_VALUE; return res; } |