aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-12-25 08:59:38 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-12-29 17:26:29 +0100
commit6dd93ee6f1b050ad7c4b247899e83efa293ee405 (patch)
tree9f4bf59828e6e84910d91513ef7f7a534f3dcbe4
parent66f7b4862fe9fd1828a6729df5d04a499af227db (diff)
downloadffmpeg-6dd93ee6f1b050ad7c4b247899e83efa293ee405.tar.gz
hlsenc: check append_entry return value
-rw-r--r--libavformat/hlsenc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 418c87d2cc..e039687d1e 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 */