diff mbox series

[FFmpeg-devel,1/1] swscale/swscale: check SWS_PRINT_INFO flag for printing alignment warnings

Message ID MN2PR04MB59818D0330F6D32039228047BABA9@MN2PR04MB5981.namprd04.prod.outlook.com
State Accepted
Commit 58dce6f010dd1c083308a7f582990e90432e2967
Headers show
Series [FFmpeg-devel,1/1] swscale/swscale: check SWS_PRINT_INFO flag for printing alignment warnings
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 16, 2021, 8:50 p.m. UTC
This makes output consistent with a similar warning just few
lines above where this flag is checked in the same way.

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 75cde31f4f..feef3482d2 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -329,7 +329,7 @@  static int swscale(SwsContext *c, const uint8_t *src[],
     ) {
         SwsContext *const ctx = c->parent ? c->parent : c;
         int cpu_flags = av_get_cpu_flags();
-        if (HAVE_MMXEXT && (cpu_flags & AV_CPU_FLAG_SSE2) &&
+        if (flags & SWS_PRINT_INFO && HAVE_MMXEXT && (cpu_flags & AV_CPU_FLAG_SSE2) &&
             !atomic_exchange_explicit(&ctx->stride_unaligned_warned,1, memory_order_relaxed)) {
             av_log(c, AV_LOG_WARNING, "Warning: data is not aligned! This can lead to a speed loss\n");
         }