projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cac55c9
)
Prevent shift overflow, patch by Anders Grönberg, galileo.m2 gmail com.
author
Anders Grönberg
<galileo.m2@gmail.com>
Sun, 14 Dec 2008 12:30:34 +0000
(12:30 +0000)
committer
Diego Biurrun
<diego@biurrun.de>
Sun, 14 Dec 2008 12:30:34 +0000
(12:30 +0000)
Originally committed as revision 16121 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/imgconvert.c
patch
|
blob
|
history
diff --git
a/libavcodec/imgconvert.c
b/libavcodec/imgconvert.c
index
1bee4b1
..
3b6918b
100644
(file)
--- 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 & (1
ULL
<< i)) {
loss = avcodec_get_pix_fmt_loss(i, src_pix_fmt, has_alpha) & loss_mask;
if (loss == 0) {
dist = avg_bits_per_pixel(i);