summaryrefslogtreecommitdiff
path: root/chromium/third_party/ffmpeg/libavformat/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavformat/gif.c')
-rw-r--r--chromium/third_party/ffmpeg/libavformat/gif.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/chromium/third_party/ffmpeg/libavformat/gif.c b/chromium/third_party/ffmpeg/libavformat/gif.c
index 7916ba1e6b2..e125d386bd2 100644
--- a/chromium/third_party/ffmpeg/libavformat/gif.c
+++ b/chromium/third_party/ffmpeg/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)