Hendrik Leppkes: > On Sun, Jul 19, 2020 at 6:15 PM Steinar H. Gunderson > <steinar+ffm...@gunderson.no> wrote: >> >> lzwenc stores a function pointer to either put_bits or put_bits_le. >> Update the function pointer's prototype after the recent change. >> --- >> libavcodec/lzw.h | 4 +++- >> libavcodec/lzwenc.c | 4 ++-- >> 2 files changed, 5 insertions(+), 3 deletions(-) >> >> diff --git a/libavcodec/lzw.h b/libavcodec/lzw.h >> index 6af8a6b83a..400a479809 100644 >> --- a/libavcodec/lzw.h >> +++ b/libavcodec/lzw.h >> @@ -32,6 +32,8 @@ >> >> #include <stdint.h> >> >> +#include "put_bits.h" >> + >> struct PutBitContext; > > This forward declaration is probably not needed anymore once you > include put_bits.h. > > I do wonder if there was a concern with including the file before that > caused the original author to use the forward declaration though... >
The reason is probably that gif and tiff (the two users of this) use different endianness (gif uses LE). A scenario like #include "lzw.h" #define BITSTREAM_WRITER_LE #include "put_bits.h" would be silently broken by this patch (the bitstream writer would be big-endian). Notice that gif.c defines BITSTREAM_WRITER_LE before including anything. - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".