matroskademux: Emit no-more-pads after parsing Tracks
authorAlicia Boya García <aboya@igalia.com>
Fri, 21 Sep 2018 20:24:02 +0000 (22:24 +0200)
committerThibault Saunier <tsaunier@igalia.com>
Fri, 21 Sep 2018 20:41:57 +0000 (17:41 -0300)
commit7ceefec7141069b4adf4451a874766f8760c66d6
treecbae1e70ec955809983160366a840b16a89614db
parent0e60076a390fd3ef53d350940b2c695ff7bbe008
matroskademux: Emit no-more-pads after parsing Tracks

Currently matroskademux does not emit no-more-pads until the first
Cluster is parsed, even though the Tracks have already been parsed and
from that point on there can be no more tracks.

This is important in MSE because the browser needs to know when the MSE
initialization segment has been completely parsed so that it can expose
the tracks to the user. Some applications depend on this been done
before they feed frames to the demuxer.

As a consequence, historically WebKit has relied on hacks such as
listening to the `pad-added` event, which made impossible to support
multiple tracks in the same file. Let's fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=797187
gst/matroska/matroska-demux.c