]> git.sesse.net Git - ffmpeg/commitdiff
hlsenc: check append_entry return value
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 25 Dec 2012 07:59:38 +0000 (08:59 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 29 Dec 2012 16:26:29 +0000 (17:26 +0100)
libavformat/hlsenc.c

index 418c87d2cc87f3a62ee31e67b75afde4aed3ab0e..e039687d1ecf97164c628f50333599a0c4e2bc72 100644 (file)
@@ -259,9 +259,12 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
         av_compare_ts(pkt->pts, st->time_base, end_pts, AV_TIME_BASE_Q) >= 0 &&
         pkt->flags & AV_PKT_FLAG_KEY) {
 
-        append_entry(hls, av_rescale(pkt->pts - hls->end_pts,
-                                     st->time_base.num,
-                                     st->time_base.den));
+        ret = append_entry(hls, av_rescale(pkt->pts - hls->end_pts,
+                                           st->time_base.num,
+                                           st->time_base.den));
+        if (ret)
+            return ret;
+
         hls->end_pts = pkt->pts;
 
         av_write_frame(oc, NULL); /* Flush any buffered data */