X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fgif.c;h=e4f2249083a755c54090c2db47ed822df9fd8376;hb=bc70684e74a185d7b80c8b80bdedda659cb581b8;hp=7916ba1e6b2a9bbaac3b08b6680e6218978d3ed3;hpb=06476249cd2332e30b66576633b2827adf3478dd;p=ffmpeg diff --git a/libavformat/gif.c b/libavformat/gif.c index 7916ba1e6b2..e4f2249083a 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -174,6 +174,9 @@ static int gif_write_trailer(AVFormatContext *s) 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) @@ -200,7 +203,7 @@ static const AVClass gif_muxer_class = { .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",