On Tue, Oct 27, 2015 at 08:09:03PM -0400, Ganesh Ajjanagadde wrote:
> Untested.
> 
> Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com>
> ---
>  libavdevice/dshow_enummediatypes.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavdevice/dshow_enummediatypes.c 
> b/libavdevice/dshow_enummediatypes.c
> index 5b69a5b..5a24870 100644
> --- a/libavdevice/dshow_enummediatypes.c
> +++ b/libavdevice/dshow_enummediatypes.c
> @@ -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 AVERROR(ENOMEM);

I cannot test this either but the surrounding code returns
E_POINTER, E_OUTOFMEMORY, ...
not AVERROR*
so this does not look correct, or at least inconsistent

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to