Commit 5e193daa authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'f65285ab'

* commit 'f65285ab':
  lavc: set sw_pix_fmt for hwaccel encoding
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 8d2d8170 f65285ab
......@@ -1593,6 +1593,17 @@ FF_ENABLE_DEPRECATION_WARNINGS
ret = AVERROR(EINVAL);
goto free_and_end;
}
if (avctx->sw_pix_fmt != AV_PIX_FMT_NONE &&
avctx->sw_pix_fmt != frames_ctx->sw_format) {
av_log(avctx, AV_LOG_ERROR,
"Mismatching AVCodecContext.sw_pix_fmt (%s) "
"and AVHWFramesContext.sw_format (%s)\n",
av_get_pix_fmt_name(avctx->sw_pix_fmt),
av_get_pix_fmt_name(frames_ctx->sw_format));
ret = AVERROR(EINVAL);
goto free_and_end;
}
avctx->sw_pix_fmt = frames_ctx->sw_format;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment