Unverified Commit 95fcd83a authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Fix linter (#6360)

parent 7d328c5b
...@@ -68,23 +68,25 @@ int transformImage( ...@@ -68,23 +68,25 @@ int transformImage(
if (context) { if (context) {
// NOTE: srcY stride always 0: this is a parameter of YUV format // NOTE: srcY stride always 0: this is a parameter of YUV format
if ((result = sws_scale( if ((result = sws_scale(
context, srcSlice, srcStride, 0, inFormat.height, planes, lines)) < context, srcSlice, srcStride, 0, inFormat.height, planes, lines)) <
0) { 0) {
LOG(ERROR) << "sws_scale failed, err: " << Util::generateErrorDesc(result); LOG(ERROR) << "sws_scale failed, err: "
<< Util::generateErrorDesc(result);
return result; return result;
} }
} else if (inFormat.width == outFormat.width && } else if (
inFormat.height == outFormat.height && inFormat.width == outFormat.width &&
inFormat.format == outFormat.format) { inFormat.height == outFormat.height &&
inFormat.format == outFormat.format) {
// Copy planes without using sws_scale if sws_getContext failed. // Copy planes without using sws_scale if sws_getContext failed.
av_image_copy( av_image_copy(
planes, planes,
lines, lines,
(const uint8_t**)srcSlice, (const uint8_t**)srcSlice,
srcStride, srcStride,
(AVPixelFormat)inFormat.format, (AVPixelFormat)inFormat.format,
inFormat.width, inFormat.width,
inFormat.height); inFormat.height);
} else { } else {
LOG(ERROR) << "Invalid scale context format " << inFormat.format; LOG(ERROR) << "Invalid scale context format " << inFormat.format;
return AVERROR(EINVAL); return AVERROR(EINVAL);
......
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