From: Nicolas George <george@nsup.org> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg_sched: do not print error code Date: Sun, 3 Aug 2025 20:36:08 +0200 Message-ID: <20250803183624.310641-1-george@nsup.org> (raw) 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".
reply other threads:[~2025-08-03 18:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250803183624.310641-1-george@nsup.org \ --to=george@nsup.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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