mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/hw_base_encode: Simplify EOF check
Found while reviewing CID1608712 Explicit null dereferenced Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b2aaeb81f6
commit
1e888fb006
|
@ -546,11 +546,10 @@ start:
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ff_encode_get_frame(avctx, frame);
|
err = ff_encode_get_frame(avctx, frame);
|
||||||
if (err < 0 && err != AVERROR_EOF)
|
if (err == AVERROR_EOF) {
|
||||||
return err;
|
|
||||||
|
|
||||||
if (err == AVERROR_EOF)
|
|
||||||
frame = NULL;
|
frame = NULL;
|
||||||
|
} else if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
err = hw_base_encode_send_frame(avctx, ctx, frame);
|
err = hw_base_encode_send_frame(avctx, ctx, frame);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
|
Loading…
Reference in New Issue