diff --git a/src/zm_packet.cpp b/src/zm_packet.cpp index 95ed6b8de..133747ea2 100644 --- a/src/zm_packet.cpp +++ b/src/zm_packet.cpp @@ -165,7 +165,7 @@ int ZMPacket::decode(AVCodecContext *ctx) { #if HAVE_LIBAVUTIL_HWCONTEXT_H #if LIBAVCODEC_VERSION_CHECK(57, 89, 0, 89, 0) - if ( fix_deprecated_pix_fmt(ctx->sw_pix_fmt) != in_frame->format ) { + if ( fix_deprecated_pix_fmt(ctx->sw_pix_fmt) != fix_deprecated_pix_fmt(static_cast(in_frame->format)) ) { Debug(1, "Have different format ctx->pix_fmt %s ?= ctx->sw_pix_fmt %s in_frame->format %s.", av_get_pix_fmt_name(ctx->pix_fmt), av_get_pix_fmt_name(ctx->sw_pix_fmt),