From 6d92307149ddb0210b9cd406e0364e1c75b7feb2 Mon Sep 17 00:00:00 2001 From: Leo Ma Date: Tue, 4 Apr 2017 19:36:58 +0800 Subject: [PATCH] Bug fix Signed-off-by: Leo Ma --- library/src/main/java/net/ossrs/yasea/SrsEncoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/net/ossrs/yasea/SrsEncoder.java b/library/src/main/java/net/ossrs/yasea/SrsEncoder.java index 23093e5..71128b8 100644 --- a/library/src/main/java/net/ossrs/yasea/SrsEncoder.java +++ b/library/src/main/java/net/ossrs/yasea/SrsEncoder.java @@ -97,7 +97,7 @@ public class SrsEncoder { // Note: the stride of resolution must be set as 16x for hard encoding with some chip like MTK // Since Y component is quadruple size as U and V component, the stride must be set as 32x - if (!useSoftEncoder && vOutWidth % 32 != 0 || vOutHeight % 32 != 0) { + if (!useSoftEncoder && (vOutWidth % 32 != 0 || vOutHeight % 32 != 0)) { if (vmci.getName().contains("MTK")) { //throw new AssertionError("MTK encoding revolution stride must be 32x"); } @@ -284,7 +284,7 @@ public class SrsEncoder { // Note: the stride of resolution must be set as 16x for hard encoding with some chip like MTK // Since Y component is quadruple size as U and V component, the stride must be set as 32x - if (!useSoftEncoder && vOutWidth % 32 != 0 || vOutHeight % 32 != 0) { + if (!useSoftEncoder && (vOutWidth % 32 != 0 || vOutHeight % 32 != 0)) { if (vmci.getName().contains("MTK")) { //throw new AssertionError("MTK encoding revolution stride must be 32x"); }