The hw frame used as reference has an attached size but it need not
match the actual size of the surface, so enforcing that the sw frame
used in copying matches its size exactly is not useful.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
AVFrame *map;
int err;
+ if (dst->width > hwfc->width || dst->height > hwfc->height)
+ return AVERROR(EINVAL);
+
map = av_frame_alloc();
if (!map)
return AVERROR(ENOMEM);
if (err)
goto fail;
+ map->width = dst->width;
+ map->height = dst->height;
+
err = av_frame_copy(dst, map);
if (err)
goto fail;
AVFrame *map;
int err;
+ if (src->width > hwfc->width || src->height > hwfc->height)
+ return AVERROR(EINVAL);
+
map = av_frame_alloc();
if (!map)
return AVERROR(ENOMEM);
if (err)
goto fail;
+ map->width = src->width;
+ map->height = src->height;
+
err = av_frame_copy(map, src);
if (err)
goto fail;