mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-30 22:00:51 +08:00
avcodec/lcevcdec: fix input dimensions for the base picture
Fixes crashes with some samples. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -50,9 +50,11 @@ static int alloc_base_frame(void *logctx, FFLCEVCContext *lcevc,
|
||||
LCEVC_PictureDesc desc;
|
||||
LCEVC_ColorFormat fmt = map_format(frame->format);
|
||||
LCEVC_PicturePlaneDesc planes[AV_VIDEO_MAX_PLANES] = { 0 };
|
||||
int width = frame->width - frame->crop_left - frame->crop_right;
|
||||
int height = frame->height - frame->crop_top - frame->crop_bottom;
|
||||
LCEVC_ReturnCode res;
|
||||
|
||||
res = LCEVC_DefaultPictureDesc(&desc, fmt, frame->width, frame->height);
|
||||
res = LCEVC_DefaultPictureDesc(&desc, fmt, width, height);
|
||||
if (res != LCEVC_Success)
|
||||
return AVERROR_EXTERNAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user