diff mbox series

[FFmpeg-devel] fftools/ffprobe: fix handling parse_options() return value

Message ID 20230726153138.9190-1-anton@khirnov.net
State Accepted
Commit e8777221f27401b8540e9a41aea4f6e55263fc65
Headers show
Series [FFmpeg-devel] fftools/ffprobe: fix handling parse_options() return value | expand

Checks

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

Commit Message

Anton Khirnov July 26, 2023, 3:31 p.m. UTC
---
 fftools/ffprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Almer July 26, 2023, 4:14 p.m. UTC | #1
On 7/26/2023 12:31 PM, Anton Khirnov wrote:
> ---
>   fftools/ffprobe.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index a39185f6fe..81610c097b 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -4113,7 +4113,7 @@ int main(int argc, char **argv)
>       show_banner(argc, argv, options);
>       ret = parse_options(NULL, argc, argv, options, opt_input_file);
>       if (ret < 0) {
> -        ret = AVERROR_EXIT ? 0 : ret;
> +        ret = (ret == AVERROR_EXIT) ? 0 : ret;
>           goto end;
>       }

LGTM.
Marton Balint July 27, 2023, 7:09 p.m. UTC | #2
On Wed, 26 Jul 2023, Anton Khirnov wrote:

> ---
> fftools/ffprobe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index a39185f6fe..81610c097b 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -4113,7 +4113,7 @@ int main(int argc, char **argv)
>     show_banner(argc, argv, options);
>     ret = parse_options(NULL, argc, argv, options, opt_input_file);
>     if (ret < 0) {
> -        ret = AVERROR_EXIT ? 0 : ret;
> +        ret = (ret == AVERROR_EXIT) ? 0 : ret;
>         goto end;

LGTM, thanks.

Marton
diff mbox series

Patch

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index a39185f6fe..81610c097b 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -4113,7 +4113,7 @@  int main(int argc, char **argv)
     show_banner(argc, argv, options);
     ret = parse_options(NULL, argc, argv, options, opt_input_file);
     if (ret < 0) {
-        ret = AVERROR_EXIT ? 0 : ret;
+        ret = (ret == AVERROR_EXIT) ? 0 : ret;
         goto end;
     }