[FFmpeg-cvslog] tests/api-band-test: simplify code

Anton Khirnov git at videolan.org
Thu Feb 25 12:47:51 EET 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jan 27 11:08:29 2021 +0100| [a5b737e6250e4a335f1d32ec6994614fa092a854] | committer: Anton Khirnov

tests/api-band-test: simplify code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5b737e6250e4a335f1d32ec6994614fa092a854
---

 tests/api/api-band-test.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/api/api-band-test.c b/tests/api/api-band-test.c
index 34bed1d6be..717c9441a4 100644
--- a/tests/api/api-band-test.c
+++ b/tests/api/api-band-test.c
@@ -167,10 +167,8 @@ static int video_decode(const char *input_filename)
             continue;
         }
 
-        if (result < 0)
-            result = avcodec_send_packet(ctx, NULL);
-        else
-            result = avcodec_send_packet(ctx, pkt);
+        // pkt will be empty on read error/EOF
+        result = avcodec_send_packet(ctx, pkt);
 
         av_packet_unref(pkt);
 



More information about the ffmpeg-cvslog mailing list