diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 13:58:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 13:59:27 +0200 |
commit | 07440c938073c6c83b8b3592dfade690bab9c19e (patch) | |
tree | 3b1931abad1c326635569947f0d07ff450a0b3b5 /libavformat/hls.c | |
parent | f7bc03bcaff5b15e566110f73db0f1fc0d24a717 (diff) | |
parent | eb33ba04e03d9f36e23fffd442510c824be709c3 (diff) | |
download | ffmpeg-07440c938073c6c83b8b3592dfade690bab9c19e.tar.gz |
Merge commit 'eb33ba04e03d9f36e23fffd442510c824be709c3'
* commit 'eb33ba04e03d9f36e23fffd442510c824be709c3':
hls: Return all packets from a previous variant before moving on to the next one
Conflicts:
libavformat/hls.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r-- | libavformat/hls.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c index 355f1a6b16..95dd1c36bc 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -702,11 +702,13 @@ start: } } } - /* Check if this stream has the packet with the lowest dts */ + /* Check if this stream still is on an earlier segment number, or + * has the packet with the lowest dts */ if (var->pkt.data) { - if(minvariant < 0) { + if (minvariant < 0 || + var->cur_seq_no < c->variants[minvariant]->cur_seq_no) { minvariant = i; - } else { + } else if (var->cur_seq_no == c->variants[minvariant]->cur_seq_no) { struct variant *minvar = c->variants[minvariant]; int64_t dts = var->pkt.dts; int64_t mindts = minvar->pkt.dts; |