tools/decode_simple: Check avcodec_send_packet() for errors on flushing

This will not error but the API allows errors so we should check it
Fixes: CID1489999 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6df8bd64ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 9 months ago
parent eb1e40909b
commit 1e23d86cd5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 5
      tools/decode_simple.c

@ -94,8 +94,9 @@ int ds_run(DecodeContext *dc)
goto finish;
}
avcodec_send_packet(dc->decoder, NULL);
ret = decode_read(dc, 1);
ret = avcodec_send_packet(dc->decoder, NULL);
if (ret >= 0)
ret = decode_read(dc, 1);
if (ret < 0) {
fprintf(stderr, "Error flushing: %d\n", ret);
return ret;

Loading…
Cancel
Save