Skip to content

Commit

Permalink
Merge commit '0d3176e32f351d18d6174d8b05796829a75a4c6b'
Browse files Browse the repository at this point in the history
* commit '0d3176e32f351d18d6174d8b05796829a75a4c6b':
  hwcontext_dxva2: do not assume the destination format during mapping is always the right one

Merged-by: Hendrik Leppkes <[email protected]>
  • Loading branch information
Nevcairiel committed Apr 1, 2017
2 parents 358d452 + 0d3176e commit d91e7aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libavutil/hwcontext_dxva2.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ static int dxva2_map_from(AVHWFramesContext *ctx,
{
int err;

if (dst->format != AV_PIX_FMT_NONE && dst->format != ctx->sw_format)
return AVERROR(ENOSYS);
dst->format = ctx->sw_format;

err = dxva2_map_frame(ctx, dst, src, flags);
if (err < 0)
return err;
Expand Down

0 comments on commit d91e7aa

Please sign in to comment.