mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
hwcontext_dxva2: make sure the sw frame format is the right one during transfer
This commit is contained in:
parent
5a1d605cea
commit
e18ba2dfd2
1 changed files with 6 additions and 0 deletions
|
|
@ -315,6 +315,9 @@ static int dxva2_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
|
|||
AVFrame *map;
|
||||
int ret;
|
||||
|
||||
if (src->format != ctx->sw_format)
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
map = av_frame_alloc();
|
||||
if (!map)
|
||||
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];
|
||||
int ret, i;
|
||||
|
||||
if (dst->format != ctx->sw_format)
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
map = av_frame_alloc();
|
||||
if (!map)
|
||||
return AVERROR(ENOMEM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue