Commit 6546fffa authored by Pierre Lespagnol's avatar Pierre Lespagnol

autoadapt: fix accel APIs parameters

Change-Id: I025db3bbc145b770e17ab7534ae1c2d704d5d276
parent 18a8429f
......@@ -776,8 +776,7 @@ MediaEncoder::initCodec(AVMediaType mediaType, AVCodecID avcodecId, uint64_t br)
} else if (avcodecId == AV_CODEC_ID_H263) {
initH263(encoderCtx, br);
}
if (accel_)
initAccel(encoderCtx, br);
initAccel(encoderCtx, br);
return encoderCtx;
}
......@@ -940,6 +939,8 @@ MediaEncoder::initH263(AVCodecContext* encoderCtx, uint64_t br)
void
MediaEncoder::initAccel(AVCodecContext* encoderCtx, uint64_t br)
{
if (!accel_)
return;
if (accel_->getName() == "nvenc") {
//Use same parameters as software
} else if (accel_->getName() == "vaapi") {
......
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