[1/2] avidec: Do not special case palette on big-endian

Message ID 20161002162541.37062-1-vittorio.giovara@gmail.com
State Committed
Commit bad4aad4037f59ba0ad656164be9ab8f7a0fa2d4
Headers show

Commit Message

Vittorio Giovara Oct. 2, 2016, 4:25 p.m.
This simplifies the code a bit, does not change output data in any way.
---
 libavformat/avidec.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Patch

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 3666b57..e8a19f5 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -652,12 +652,8 @@  static int avi_read_header(AVFormatContext *s)
                         pal_size = FFMIN(pal_size, st->codecpar->extradata_size);
                         pal_src  = st->codecpar->extradata +
                                    st->codecpar->extradata_size - pal_size;
-#if HAVE_BIGENDIAN
                         for (i = 0; i < pal_size / 4; i++)
-                            ast->pal[i] = av_bswap32(((uint32_t *)pal_src)[i]);
-#else
-                        memcpy(ast->pal, pal_src, pal_size);
-#endif
+                            ast->pal[i] = AV_RL32(pal_src + 4 * i);
                         ast->has_pal = 1;
                     }