[FFmpeg-cvslog] hlsenc: check append_entry return value

Luca Barbato git at videolan.org
Sun Dec 30 14:01:41 CET 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Dec 25 08:59:38 2012 +0100| [6dd93ee6f1b050ad7c4b247899e83efa293ee405] | committer: Luca Barbato

hlsenc: check append_entry return value

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6dd93ee6f1b050ad7c4b247899e83efa293ee405
---

 libavformat/hlsenc.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 418c87d..e039687 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list