From 31c3a4dc7e15f993b0076c7231f80249a55ea146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Gr=C3=B6nberg?= Date: Sun, 14 Dec 2008 12:30:34 +0000 Subject: [PATCH] =?UTF-8?q?Prevent=20shift=20overflow,=20patch=20by=20Ande?= =?UTF-8?q?rs=20Gr=C3=B6nberg,=20galileo.m2=20gmail=20com.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 16121 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/imgconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 1bee4b13ef..3b6918bf5c 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -784,7 +784,7 @@ static int avcodec_find_best_pix_fmt1(int64_t pix_fmt_mask, dst_pix_fmt = -1; min_dist = 0x7fffffff; for(i = 0;i < PIX_FMT_NB; i++) { - if (pix_fmt_mask & (1 << i)) { + if (pix_fmt_mask & (1ULL << i)) { loss = avcodec_get_pix_fmt_loss(i, src_pix_fmt, has_alpha) & loss_mask; if (loss == 0) { dist = avg_bits_per_pixel(i);