aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-24 03:41:50 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-24 03:41:50 +0100
commit64cafe340bd5ddfe704efa95cd9f21471ca12a12 (patch)
tree4dc547883559f489af91d98f7bf96ba813413247
parentc7062802d920b20e942b107e0f31207bd50bb36f (diff)
downloadffmpeg-64cafe340bd5ddfe704efa95cd9f21471ca12a12.tar.gz
Make the avi palette opaque.
-rw-r--r--libavformat/avidec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 9191b625c4..6112af42e1 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -623,12 +623,8 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
pal_size = FFMIN(pal_size, st->codec->extradata_size);
pal_src = st->codec->extradata + st->codec->extradata_size - pal_size;
-#if HAVE_BIGENDIAN
for (i = 0; i < pal_size/4; i++)
- ast->pal[i] = AV_RL32(pal_src+4*i);
-#else
- memcpy(ast->pal, pal_src, pal_size);
-#endif
+ ast->pal[i] = 0xFF<<24 | AV_RL32(pal_src+4*i);
ast->has_pal = 1;
}
@@ -971,7 +967,7 @@ start_sync:
avio_rl16(pb); //flags
for (; k <= last; k++)
- ast->pal[k] = avio_rb32(pb)>>8;// b + (g << 8) + (r << 16);
+ ast->pal[k] = 0xFF<<24 | avio_rb32(pb)>>8;// b + (g << 8) + (r << 16);
ast->has_pal= 1;
goto start_sync;
} else if( ((ast->prefix_count<5 || sync+9 > i) && d[2]<128 && d[3]<128) ||