On Sat, Oct 31, 2015 at 10:46:09AM -0400, Ganesh Ajjanagadde wrote:
> On Wed, Oct 28, 2015 at 10:05 PM, Ganesh Ajjanagadde <gajja...@mit.edu> wrote:
> > On Wed, Oct 28, 2015 at 10:00 PM, Michael Niedermayer
> > <mich...@niedermayer.cc> wrote:
> >> 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
> >
> > Looks like some Windows thing, I guess E_OUTOFMEMORY is the best
> > choice. This needs to wait for a review from a Windows using dev IMO.
> 
> Assuming the change from AVERROR(ENOMEM) to E_OUTOFMEMORY, is this
> patch ok? Worst case, build should be guaranteed.

should be ok

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact

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