mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
avutil/hwcontext_drm: fix mapping when dst format is unset
av_hwframe_map() is documented to work with a blank dst frame, but hwcontext_drm currently fails if dst->format == AV_PIX_FMT_NONE. Signed-off-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
1 parent
858aa6176b
commit
37f02603b1
1 file changed
+3
-1
@@ -288,7 +288,9 @@ static int drm_map_from(AVHWFramesContext *hwfc, AVFrame *dst,
|
||||
{
|
||||
int err;
|
||||
|
||||
if (hwfc->sw_format != dst->format)
|
||||
if (dst->format == AV_PIX_FMT_NONE)
|
||||
dst->format = hwfc->sw_format;
|
||||
else if (hwfc->sw_format != dst->format)
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
err = drm_map_frame(hwfc, dst, src, flags);
|
||||
|
||||
Reference in new issue
Block a user