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

2023-07-27 Thread Marton Balint




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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


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

2023-07-26 Thread James Almer

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.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


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

2023-07-26 Thread Anton Khirnov
---
 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;
 }
 
-- 
2.40.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".