mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423'
* commit 'e18ba2dfd2d19aedc8afccf011d5fd0833352423': hwcontext_dxva2: make sure the sw frame format is the right one during transfer Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
commit
5c612c5ff8
|
@ -331,6 +331,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);
|
||||||
|
@ -355,6 +358,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);
|
||||||
|
|
Loading…
Reference in New Issue