--- libavformat/gif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libavformat/gif.c b/libavformat/gif.c index 01d98a27b0..3336152c06 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -174,8 +174,12 @@ static int flush_packet(AVFormatContext *s, AVPacket *new) avio_write(pb, pkt->data, pkt->size); av_packet_unref(gif->prev_pkt); - if (new) - av_packet_ref(gif->prev_pkt, new); + if (new) { + int ret; + ret = av_packet_ref(gif->prev_pkt, new); + if (ret < 0) + return ret; + } return 0; } -- 2.11.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel