swscale/swscale: check SWS_PRINT_INFO flag for printing alignment warnings

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>
Signed-off-by: Marton Balint <cus@passwd.hu>
pull/374/head
Soft Works 3 years ago committed by Marton Balint
parent f3b6e3e81a
commit 58dce6f010
  1. 2
      libswscale/swscale.c

@ -329,7 +329,7 @@ static int swscale(SwsContext *c, const uint8_t *src[],
) { ) {
SwsContext *const ctx = c->parent ? c->parent : c; SwsContext *const ctx = c->parent ? c->parent : c;
int cpu_flags = av_get_cpu_flags(); 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)) { !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"); av_log(c, AV_LOG_WARNING, "Warning: data is not aligned! This can lead to a speed loss\n");
} }

Loading…
Cancel
Save