diff options
author | Roman Shaposhnik <roman@shaposhnik.org> | 2003-11-04 19:35:43 +0000 |
---|---|---|
committer | Roman Shaposhnik <roman@shaposhnik.org> | 2003-11-04 19:35:43 +0000 |
commit | 19d053c5ba6c250ef8a9675bf803cb744085d2f1 (patch) | |
tree | 0ef52a1910e857e48c4d534f496a2c93e64cdab6 /libavformat/asf.c | |
parent | ec62c38fd57d8276e235ca7d95d785850dc93bf8 (diff) | |
download | ffmpeg-19d053c5ba6c250ef8a9675bf803cb744085d2f1.tar.gz |
* fixes for broken builds on Solaris, OS2 and all bingendian
systems out there.
Originally committed as revision 2480 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index b069b1d086..06e2ebe855 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -915,8 +915,8 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) if (st->codec.extradata_size && (st->codec.bits_per_sample <= 8)) { st->codec.palctrl = av_mallocz(sizeof(AVPaletteControl)); #ifdef WORDS_BIGENDIAN - for (i = 0; i < FFMIN(st->codec.extradata_size / 4, 256); i++) - st->codec.palctrl->palette[i] = bswap_32(st->codec.extradata)[i * 4]); + for (i = 0; i < FFMIN(st->codec.extradata_size, AVPALETTE_SIZE)/4; i++) + st->codec.palctrl->palette[i] = bswap_32(((uint32_t*)st->codec.extradata)[i]); #else memcpy(st->codec.palctrl->palette, st->codec.extradata, FFMIN(st->codec.extradata_size, AVPALETTE_SIZE)); |