[FFmpeg-cvslog] avdevice/dshow_enummediatypes: check return of av_malloc
Ganesh Ajjanagadde
git at videolan.org
Fri Nov 6 15:38:49 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Mon Oct 26 14:49:21 2015 -0400| [6f1ddc726f0763cd9cc271e33ba0769d821d74da] | committer: Ganesh Ajjanagadde
avdevice/dshow_enummediatypes: check return of av_malloc
Untested.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f1ddc726f0763cd9cc271e33ba0769d821d74da
---
libavdevice/dshow_enummediatypes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavdevice/dshow_enummediatypes.c b/libavdevice/dshow_enummediatypes.c
index 5b69a5b..3a66a4d 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 E_OUTOFMEMORY;
ff_copy_dshow_media_type(type, &this->type);
*types = type;
count = 1;
More information about the ffmpeg-cvslog
mailing list