aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorSimon Thelen <ffmpeg-dev@c-14.de>2014-07-09 21:40:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-17 02:35:56 +0200
commitfa6716c66d31385a0f306c2a3f46f44e0d928ff9 (patch)
tree78bea0011327e0bf09a15db671670b6f2d6ccfcc /libavformat/segment.c
parent37a0ac1d8227a6612024e6d177c76b392ce59840 (diff)
downloadffmpeg-fa6716c66d31385a0f306c2a3f46f44e0d928ff9.tar.gz
libavformat/segment: change segment_list_size behavior to match hls_list_size behavior.
Make the segment muxer keep segment_list_size segments instead of segment_list_size + 1 segments. This patch also changes the documentation for segment_list_size to reduce possible confusion over how many segments are kept. this allows the segment list to be limited to containing only one segment which used to be impossible because a segment_list_size of 0 kept all the segments and a segment_list_size of 1 kept 2 segments. Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index f8227d149e..3de462326a 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -333,7 +333,7 @@ static int segment_end(AVFormatContext *s, int write_trailer, int is_last)
seg->segment_list_entries_end = entry;
/* drop first item */
- if (seg->list_size && seg->segment_count > seg->list_size) {
+ if (seg->list_size && seg->segment_count >= seg->list_size) {
entry = seg->segment_list_entries;
seg->segment_list_entries = seg->segment_list_entries->next;
av_free(entry->filename);