summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-11 01:56:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-11 01:56:11 +0200
commit28b7d7a36d0ee6458853af089b7ca193c03f1f10 (patch)
tree549fc39652fd584e13a0e06fe8d19de98d20f71b /libavformat/dashenc.c
parentae99f06e5a5f8010a0050bbb05636515d92064f9 (diff)
parentb8d2630c5327d2818d05c8a48be0417905d8e0fd (diff)
Merge commit 'b8d2630c5327d2818d05c8a48be0417905d8e0fd'
* commit 'b8d2630c5327d2818d05c8a48be0417905d8e0fd': dashenc: Reduce the segment duration if cutting out parts with edit lists Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 127f5b12ff..7a932147e5 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -702,9 +702,11 @@ static int add_segment(OutputStream *os, const char *file,
return AVERROR(ENOMEM);
av_strlcpy(seg->file, file, sizeof(seg->file));
seg->time = time;
- if (seg->time < 0) // If pts<0, it is expected to be cut away with an edit list
- seg->time = 0;
seg->duration = duration;
+ if (seg->time < 0) { // If pts<0, it is expected to be cut away with an edit list
+ seg->duration += seg->time;
+ seg->time = 0;
+ }
seg->start_pos = start_pos;
seg->range_length = range_length;
seg->index_length = index_length;