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 <aicomman...@gmail.com> --- libavutil/hwcontext_drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_drm.c b/libavutil/hwcontext_drm.c index 7a9fdbd263..85a9fd4984 100644 --- a/libavutil/hwcontext_drm.c +++ b/libavutil/hwcontext_drm.c @@ -287,7 +287,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); -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".