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>
This commit is contained in:
Michael Niedermayer 2013-07-29 13:58:21 +02:00
commit 07440c9380
1 changed files with 5 additions and 3 deletions

View File

@ -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;