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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bfc22f36
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment