mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
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>
This commit is contained in:
parent
bfc22f364d
commit
6df8bd64ff
@ -94,8 +94,9 @@ int ds_run(DecodeContext *dc)
|
|||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
avcodec_send_packet(dc->decoder, NULL);
|
ret = avcodec_send_packet(dc->decoder, NULL);
|
||||||
ret = decode_read(dc, 1);
|
if (ret >= 0)
|
||||||
|
ret = decode_read(dc, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Error flushing: %d\n", ret);
|
fprintf(stderr, "Error flushing: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user