[FFmpeg-devel] [PATCH 1/6] Fix dshow device name/description

Diederick C. Niehorster dcnieho at gmail.com
Tue Mar 22 21:07:46 EET 2022


On Tue, Mar 22, 2022 at 3:10 PM Roger Pack <rogerdpack2 at gmail.com> wrote:
>
> On Tue, Mar 22, 2022 at 7:40 AM <toots at rastageeks.org> wrote:
> >
> > From: Romain Beauxis <romain.beauxis at nextstep.com>
> >
> > diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
> > index 6039578ff9..4ee3f6e194 100644
> > --- a/libavdevice/dshow.c
> > +++ b/libavdevice/dshow.c
> > @@ -552,8 +552,8 @@ dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum,
> >                  if (!device)
> >                      goto fail;
> >
> > -                device->device_name = av_strdup(friendly_name);
> > -                device->device_description = av_strdup(unique_name);
> > +                device->device_name = av_strdup(unique_name);
> > +                device->device_description = av_strdup(friendly_name);
> >                  if (!device->device_name || !device->device_description)
> >                      goto fail;
> >
>
> LGTM.
> The device enumeration API was added only recently to dshow, guess a
> bug crept in.
> Thanks!

LGTM.

Indeed, this was code introduced by my patch, committed to the ffmpeg
repo only 91 days ago. Indeed, this should have been the other way
around given the documentation of struct AVDeviceInfo.

All the best,
Dee


More information about the ffmpeg-devel mailing list