mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
lavfi/vf_dnn_processing.c: fix CID 1460603
CID 1460603 (#1 of 1): Improper use of negative value (NEGATIVE_RETURNS)
This commit is contained in:
parent
3fb1d2e71c
commit
4718d74c58
@ -225,6 +225,9 @@ static int copy_uv_planes(DnnProcessingContext *ctx, AVFrame *out, const AVFrame
|
||||
uv_height = AV_CEIL_RSHIFT(in->height, desc->log2_chroma_h);
|
||||
for (int i = 1; i < 3; ++i) {
|
||||
int bytewidth = av_image_get_linesize(in->format, in->width, i);
|
||||
if (bytewidth < 0) {
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
av_image_copy_plane(out->data[i], out->linesize[i],
|
||||
in->data[i], in->linesize[i],
|
||||
bytewidth, uv_height);
|
||||
|
Loading…
Reference in New Issue
Block a user