diff mbox series

[FFmpeg-devel] enc_recon_frame_test: don't print an error on EOF.

Message ID 20241108153842.57138-1-rsbultje@gmail.com
State New
Headers show
Series [FFmpeg-devel] enc_recon_frame_test: don't print an error on EOF. | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Ronald S. Bultje Nov. 8, 2024, 3:38 p.m. UTC
Before:
$ make tools/enc_recon_frame_test
$ tools/enc_recon_frame_test ~/Movies/cif/bus_cif.y4m libx264 'tune=psnr'
Error submitting a frame for encoding

After:
All 150 encoded frames match
---
 tools/enc_recon_frame_test.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tools/enc_recon_frame_test.c b/tools/enc_recon_frame_test.c
index c6da6750fe..83cc8343d3 100644
--- a/tools/enc_recon_frame_test.c
+++ b/tools/enc_recon_frame_test.c
@@ -178,6 +178,8 @@  static int process_frame(DecodeContext *dc, AVFrame *frame)
     }
 
     ret = avcodec_send_frame(pd->enc, frame);
+    if (ret == AVERROR_EOF && !frame)
+        return 0;
     if (ret < 0) {
         fprintf(stderr, "Error submitting a frame for encoding\n");
         return ret;