summaryrefslogtreecommitdiff
path: root/tests/api
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-27 11:08:29 +0100
committerAnton Khirnov <anton@khirnov.net>2021-02-25 11:46:28 +0100
commita5b737e6250e4a335f1d32ec6994614fa092a854 (patch)
tree867f6f7f2f1189d5843b2b15db96a1315c3bd3c4 /tests/api
parent9e4225cf7f26b57e0054470127bcc032b6d29742 (diff)
tests/api-band-test: simplify code
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/api-band-test.c6
1 files 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);