GIFContext *gif = s->priv_data;
AVIOContext *pb = s->pb;
+ if (!gif->prev_pkt)
+ return AVERROR(EINVAL);
+
gif_write_packet(s, NULL);
if (!gif->have_end)
.option = options,
};
-AVOutputFormat ff_gif_muxer = {
+const AVOutputFormat ff_gif_muxer = {
.name = "gif",
.long_name = NULL_IF_CONFIG_SMALL("CompuServe Graphics Interchange Format (GIF)"),
.mime_type = "image/gif",