This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 2c47383d74ecce111843456470f4bdbfbf30133d Author: Jun Zhao <[email protected]> AuthorDate: Sun Mar 8 22:52:51 2026 +0800 Commit: toots <[email protected]> CommitDate: Wed Mar 18 02:08:09 2026 +0000 doc/examples/hw_decode: fix fwrite error check fwrite() returns size_t (unsigned), so comparing its return value with < 0 is always false and write errors are silently ignored. Check against the expected byte count instead. Signed-off-by: Jun Zhao <[email protected]> --- doc/examples/hw_decode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/examples/hw_decode.c b/doc/examples/hw_decode.c index ce18814760..7c73d59d93 100644 --- a/doc/examples/hw_decode.c +++ b/doc/examples/hw_decode.c @@ -132,8 +132,9 @@ static int decode_write(AVCodecContext *avctx, AVPacket *packet) goto fail; } - if ((ret = fwrite(buffer, 1, size, output_file)) < 0) { + if (fwrite(buffer, 1, size, output_file) != size) { fprintf(stderr, "Failed to dump raw data.\n"); + ret = -1; goto fail; } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
