Commit 6f1ddc72 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

avdevice/dshow_enummediatypes: check return of av_malloc

Untested.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent b456ece5
......@@ -37,6 +37,8 @@ libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n,
if (!this->pos && n == 1) {
if (!IsEqualGUID(&this->type.majortype, &GUID_NULL)) {
AM_MEDIA_TYPE *type = av_malloc(sizeof(AM_MEDIA_TYPE));
if (!type)
return E_OUTOFMEMORY;
ff_copy_dshow_media_type(type, &this->type);
*types = type;
count = 1;
......
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