Commit f53f786d authored by ogg.k.ogg.k's avatar ogg.k.ogg.k
Browse files

mark discontinuous streams as complete without having to wait for

 the first non-header packet, or greedy buffering would happen
 till the first data packet would be found (bad for subtitles).
parent 93732e30
......@@ -96,7 +96,8 @@ public class OggDemux extends Element
}
public boolean isComplete () {
return complete;
/* discontinuous codecs do not need to wait for data to allow playback */
return complete || payload.isDiscontinuous();
}
public void activate() {
if (active)
......@@ -245,10 +246,6 @@ public class OggDemux extends Element
}
/* if we have all the headers we can stream */
if (haveHeaders && !payload.isHeader(op)) {
/* discontinuous codecs do not need to wait for data to allow playback */
if (!complete && payload.isDiscontinuous()) {
complete = true;
}
if (complete && started) {
int ret;
com.fluendo.jst.Buffer data = bufferFromPacket (op);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment