[FFmpeg-devel] [PATCH] gifdec: workaround old gcc 4.2 mis-compiling code

Michael Niedermayer michaelni at gmx.at
Sun Mar 24 21:29:34 CET 2013


It appears gcc forgets to increment the byte stream pointer at -O3
I was not able to spot a reason/excuse for it to do that. It
also disappears if an av_log() is placed in the function.

This should fix the gif fate failures on open & free bsd

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/gifdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 27364c9..a3556c3 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -400,7 +400,7 @@ static int gif_read_header1(GifState *s)
     return 0;
 }
 
-static int gif_parse_next_image(GifState *s, AVFrame *frame)
+static int av_noinline gif_parse_next_image(GifState *s, AVFrame *frame)
 {
     while (bytestream2_get_bytes_left(&s->gb)) {
         int code = bytestream2_get_byte(&s->gb);
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list