From: Steinar H. Gunderson Date: Wed, 12 Jul 2023 21:05:42 +0000 (+0200) Subject: Fix an inverted condition in YCbCr format choice. X-Git-Tag: 2.2.2~2 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=2c21362d9d08392c1a432fe0686f32b829bf6cfc Fix an inverted condition in YCbCr format choice. --- diff --git a/nageru/ffmpeg_capture.cpp b/nageru/ffmpeg_capture.cpp index dd053f8..384ecdb 100644 --- a/nageru/ffmpeg_capture.cpp +++ b/nageru/ffmpeg_capture.cpp @@ -123,8 +123,8 @@ AVPixelFormat decide_dst_format(AVPixelFormat src_format, bmusb::PixelFormat dst if (desc->comp[0].depth != 8) continue; // Same or better chroma resolution only. - int chroma_w_diff = desc->log2_chroma_w - src_desc->log2_chroma_w; - int chroma_h_diff = desc->log2_chroma_h - src_desc->log2_chroma_h; + int chroma_w_diff = src_desc->log2_chroma_w - desc->log2_chroma_w; + int chroma_h_diff = src_desc->log2_chroma_h - desc->log2_chroma_h; if (chroma_w_diff < 0 || chroma_h_diff < 0) continue;