Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-15 00:38:55 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-15 01:15:54 +0400
commitb4e2e03709996a0836f6a71535d48b50201338eb (patch)
tree62592941724adb9cf05357eb81c9a9b47d89507b /libavcodec/lzwenc.c
parent5dd5985e0530214abd65a0bcdd711dd13ac0e880 (diff)
avcodec/lzwenc: Add 1 additional bit of padding for gif
This fixes issues with gimp reading animated gifs Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lzwenc.c')
-rw-r--r--libavcodec/lzwenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/lzwenc.c b/libavcodec/lzwenc.c
index 7e30765cb9..0599d64c43 100644
--- a/libavcodec/lzwenc.c
+++ b/libavcodec/lzwenc.c
@@ -262,6 +262,9 @@ int ff_lzw_encode_flush(LZWEncodeState *s,
if (s->last_code != -1)
writeCode(s, s->last_code);
writeCode(s, s->end_code);
+ if (s->mode == FF_LZW_GIF)
+ s->put_bits(&s->pb, 1, 0);
+
lzw_flush_put_bits(&s->pb);
s->last_code = -1;