* [FFmpeg-devel] [PATCH] fftools/ffmpeg_sched: do not print error code
@ 2025-08-03 18:36 Nicolas George
0 siblings, 0 replies; only message in thread
From: Nicolas George @ 2025-08-03 18:36 UTC (permalink / raw)
To: ffmpeg-devel
The error codes are meaningless to users, especially
the ones that do not come from standard errno codes.
Signed-off-by: Nicolas George <george@nsup.org>
---
fftools/ffmpeg_sched.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c
index 3180367576..ba9708b65b 100644
--- a/fftools/ffmpeg_sched.c
+++ b/fftools/ffmpeg_sched.c
@@ -2534,7 +2534,7 @@ static void *task_wrapper(void *arg)
ret = task->func(task->func_arg);
if (ret < 0)
av_log(task->func_arg, AV_LOG_ERROR,
- "Task finished with error code: %d (%s)\n", ret, av_err2str(ret));
+ "Task finished with error: %s\n", av_err2str(ret));
err = task_cleanup(sch, task->node);
ret = err_merge(ret, err);
@@ -2549,9 +2549,12 @@ static void *task_wrapper(void *arg)
pthread_mutex_unlock(&sch->finish_lock);
}
- av_log(task->func_arg, ret < 0 ? AV_LOG_ERROR : AV_LOG_VERBOSE,
- "Terminating thread with return code %d (%s)\n", ret,
- ret < 0 ? av_err2str(ret) : "success");
+ if (ret < 0)
+ av_log(task->func_arg, AV_LOG_ERROR,
+ "Terminating thread with error: %s\n", av_err2str(ret));
+ else
+ av_log(task->func_arg, AV_LOG_VERBOSE,
+ "Terminating thread with success\n");
return (void*)(intptr_t)ret;
}
--
2.47.2
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-03 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-03 18:36 [FFmpeg-devel] [PATCH] fftools/ffmpeg_sched: do not print error code Nicolas George
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git