]> git.sesse.net Git - ffmpeg/commitdiff
avformat/gif: simplify signature writing
authorPaul B Mahol <onemda@gmail.com>
Mon, 10 Dec 2018 17:36:11 +0000 (18:36 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 10 Dec 2018 20:13:15 +0000 (21:13 +0100)
libavformat/gif.c

index 01d98a27b0535b1f3f859df1b5d7d3b91cd21d14..62d995a9076bb567a3f9e7edba6f6dddea092b5c 100644 (file)
@@ -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);