tests/api-band-test: simplify code

This commit is contained in:
Anton Khirnov 2021-01-27 11:08:29 +01:00
parent 9e4225cf7f
commit a5b737e625
1 changed files with 2 additions and 4 deletions

View File

@ -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);