X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fgif.c;h=e125d386bd2d2dda93278f47167dc6439890d3d8;hb=2a19232c1996fee52a3f4201fa379001627dcc89;hp=7916ba1e6b2a9bbaac3b08b6680e6218978d3ed3;hpb=34a0a9746b2f441db7c45983838a88aa87a33834;p=ffmpeg diff --git a/libavformat/gif.c b/libavformat/gif.c index 7916ba1e6b2..e125d386bd2 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)