Commit 996ce5e8 authored by diego's avatar diego

Prevent shift overflow, patch by Anders Grönberg, galileo.m2 gmail com.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16121 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 843f2b40
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment