Message ID | 20240308082515.53722-1-martin@martin.st |
---|---|
State | Accepted |
Commit | 71e871280dee7d6cef3b521007af97f4ef706e83 |
Headers | show |
Series | [FFmpeg-devel] libavdevice: Fix the avfoundation device after switching to FFInputFormat | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
Martin Storsjö: > This was missed in b800327f4c7233d09baca958121722a04c2035ff. > --- > libavdevice/avfoundation.m | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m > index a0ef87edff..d9b17ccdae 100644 > --- a/libavdevice/avfoundation.m > +++ b/libavdevice/avfoundation.m > @@ -32,6 +32,7 @@ > #include "libavutil/pixdesc.h" > #include "libavutil/opt.h" > #include "libavutil/avstring.h" > +#include "libavformat/demux.h" > #include "libavformat/internal.h" > #include "libavutil/internal.h" > #include "libavutil/parseutils.h" > @@ -1292,13 +1293,13 @@ static int avf_close(AVFormatContext *s) > .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, > }; > > -const AVInputFormat ff_avfoundation_demuxer = { > - .name = "avfoundation", > - .long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"), > +const FFInputFormat ff_avfoundation_demuxer = { > + .p.name = "avfoundation", > + .p.long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"), > + .p.flags = AVFMT_NOFILE, > + .p.priv_class = &avf_class, > .priv_data_size = sizeof(AVFContext), > .read_header = avf_read_header, > .read_packet = avf_read_packet, > .read_close = avf_close, > - .flags = AVFMT_NOFILE, > - .priv_class = &avf_class, > }; LGTM. Sorry for having missed this. - Andreas
diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m index a0ef87edff..d9b17ccdae 100644 --- a/libavdevice/avfoundation.m +++ b/libavdevice/avfoundation.m @@ -32,6 +32,7 @@ #include "libavutil/pixdesc.h" #include "libavutil/opt.h" #include "libavutil/avstring.h" +#include "libavformat/demux.h" #include "libavformat/internal.h" #include "libavutil/internal.h" #include "libavutil/parseutils.h" @@ -1292,13 +1293,13 @@ static int avf_close(AVFormatContext *s) .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, }; -const AVInputFormat ff_avfoundation_demuxer = { - .name = "avfoundation", - .long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"), +const FFInputFormat ff_avfoundation_demuxer = { + .p.name = "avfoundation", + .p.long_name = NULL_IF_CONFIG_SMALL("AVFoundation input device"), + .p.flags = AVFMT_NOFILE, + .p.priv_class = &avf_class, .priv_data_size = sizeof(AVFContext), .read_header = avf_read_header, .read_packet = avf_read_packet, .read_close = avf_close, - .flags = AVFMT_NOFILE, - .priv_class = &avf_class, };