---
libavformat/webpenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c
index 9fb472257d..d1ebb5fbe5 100644
--- a/libavformat/webpenc.c
+++ b/libavformat/webpenc.c
@@ -158,7 +158,9 @@ static int webp_write_packet(AVFormatContext *s, AVPacket
*pkt)
int ret;
if ((ret = flush(s, 0, pkt->pts)) < 0)
return ret;
- av_packet_ref(&w->last_pkt, pkt);
+ ret = av_packet_ref(&w->last_pkt, pkt);
+ if (ret < 0)
+ return ret;
}
++w->frame_count;
--
2.11.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel