[FFmpeg-devel] [PATCH 46/47] fftools/ffprobe: stop calling exit_program()

Anton Khirnov anton at khirnov.net
Fri Jul 21 15:14:30 EEST 2023


Quoting Anton Khirnov (2023-07-21 14:06:37)
> Quoting Marton Balint (2023-07-20 22:35:23)
> > 
> > 
> > On Sat, 15 Jul 2023, Anton Khirnov wrote:
> > 
> > > Inline the relevant part of ffprobe_cleanup() into main() and drop the
> > > rest.
> > > ---
> > > fftools/ffprobe.c | 22 ++++++++--------------
> > > 1 file changed, 8 insertions(+), 14 deletions(-)
> > >
> > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> > > index e234c92904..a39185f6fe 100644
> > > --- a/fftools/ffprobe.c
> > > +++ b/fftools/ffprobe.c
> > > @@ -381,17 +381,6 @@ static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
> > > #endif
> > > }
> > >
> > 
> > 
> > [...]
> > 
> > > @@ -4124,8 +4112,10 @@ int main(int argc, char **argv)
> > >
> > >     show_banner(argc, argv, options);
> > >     ret = parse_options(NULL, argc, argv, options, opt_input_file);
> > > -    if (ret < 0)
> > > -        exit_program(ret == AVERROR_EXIT ? 0 : 1);
> > > +    if (ret < 0) {
> > > +        ret = AVERROR_EXIT ? 0 : ret;
> > 
> > This looks unintended.
> 
> Which part of it and why?

Never mind, I see it now. I'll send a patch.

Thanks,
-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list