[FFmpeg-cvslog] avformat/gif: simplify signature writing

Paul B Mahol git at videolan.org
Mon Dec 10 22:41:17 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec 10 18:36:11 2018 +0100| [6a20876b6203196eeb2cf3d4a4a0aaa67f00a781] | committer: Paul B Mahol

avformat/gif: simplify signature writing

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a20876b6203196eeb2cf3d4a4a0aaa67f00a781
---

 libavformat/gif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/gif.c b/libavformat/gif.c
index 01d98a27b0..62d995a907 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -27,6 +27,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/log.h"
 #include "libavutil/opt.h"
+#include "libavcodec/gif.h"
 
 /* XXX: random value that shouldn't be taken into effect if there is no
  * transparent color in the palette (the transparency bit will be set to 0) */
@@ -63,8 +64,7 @@ static int gif_image_write_header(AVIOContext *pb, AVStream *st,
             aspect = 0;
     }
 
-    avio_write(pb, "GIF", 3);
-    avio_write(pb, "89a", 3);
+    avio_write(pb, gif89a_sig, sizeof(gif89a_sig));
     avio_wl16(pb, st->codecpar->width);
     avio_wl16(pb, st->codecpar->height);
 



More information about the ffmpeg-cvslog mailing list