You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
hwcontext_dxva2: make sure the sw frame format is the right one during transfer
This commit is contained in:
@@ -315,6 +315,9 @@ static int dxva2_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
|
|||||||
AVFrame *map;
|
AVFrame *map;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (src->format != ctx->sw_format)
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
|
|
||||||
map = av_frame_alloc();
|
map = av_frame_alloc();
|
||||||
if (!map)
|
if (!map)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
@@ -339,6 +342,9 @@ static int dxva2_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
|
|||||||
ptrdiff_t src_linesize[4], dst_linesize[4];
|
ptrdiff_t src_linesize[4], dst_linesize[4];
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
|
if (dst->format != ctx->sw_format)
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
|
|
||||||
map = av_frame_alloc();
|
map = av_frame_alloc();
|
||||||
if (!map)
|
if (!map)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
Reference in New Issue
Block a user