]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/gif.c
avformat/dump: Remove remnants of codec timebase
[ffmpeg] / libavformat / gif.c
index 7916ba1e6b2a9bbaac3b08b6680e6218978d3ed3..e4f2249083a755c54090c2db47ed822df9fd8376 100644 (file)
@@ -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",