That is, if parse error occurs in state requiring to move to next cluster,
and doing so to the expected next position of cluster fails, then scan for a
next cluster from present position and resume from there.
Fixes#620790.
If some bits out of place in block(group) parsing, forego and move to next.
Also skip large blocks in pull mode, but need to give up in push mode.
Fixes#626463.
Improves #620790.
That is, in files that have no index (Cue), perform seek by scanning for
nearest cluster with timecode before requested position. Scanning is done
as a combination of interpolation and sequential scan.
Fixes#617368.
So matroska's Block structure has no keyframe flag, only the SimpleBlock has it.
To detect keyframes in Blocks, it is just the BlockGroup container that needs
to have a ReferenceBlock attached if it is a delta frame in video.
Start cluster at every keyframe or when we would overflow the previous
cluster's relative timestamp field. This would avoid as much as possible
starting clusters at non-keyframes.
This allows us to skip delta units earlier and is a bit clearer in my
opinion. It also makes only video buffers ever be delta units, not
just for SimpleBlock as before.
When the keyframe bit of SimpleBlock Flags wasn't set, the buffer was being
marked with GST_BUFFER_FLAG_DELTA_UNIT, causing all buffers to be skipped
after a seek. This may be a problem with the Sorenson Squish encoder, but
arguably the keyframe bit should only be applied to video.
Fixes bug #620358.
In demuxer and muxer use the gst_util_uint64 scaling functions rather than
standard integer division. Add warnings (to be changed to debug) for debugging
the timestamp and duration.
Specifically, this reduces pushing several small buffers for each
data buffer and also avoids a seek for each buffer altogether
(though a seek is still needed for each cluster).
Fixes#619273.
Before, vp8dec had no option but to decode all frames even if some/all
of them would be late. With this change, performance when keyframes are
frequent is helped a great deal. On my Thinkpad X60s, decoding a 20 s
1080p sunflower encode with keyframes every 10 frames went from taking
42 s with 5 frames shown to 21 s with 15 frames shown (still slow
enough to count by hand). When keyframes are more sparse, you will
still be able to catch up eventually, but the results won't be as
noticable.