tsdemux: Push GAP events *after* deactivating old programs
authorEdward Hervey <edward@centricular.com>
Tue, 20 Oct 2015 15:22:23 +0000 (17:22 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 2 Dec 2015 13:15:04 +0000 (14:15 +0100)
commit531117b7df1002f816f2a4e3259fdcdfa470cb72
tree94cb1ed2ef09847c0f3525b532d7af50e4697503
parent7336294635d6066c812ca918e799a5ed21f177bb
tsdemux: Push GAP events *after* deactivating old programs

The order in which program switch must happen is:
1) drain all data on old pads (but don't push EOS)
2) add new pads (but don't push any data on them)
3) Push EOS and remove old pads
4) Start pushing data on new pads

There was one caveat in this implementation, which is that when
we activate a sparse pad (step 2) we would push a GAP event. The problem
is that, while being an event, it is actually *data*.

We therefore need to make sure pushing those GAP event is done at the step
we start pushing data.

https://bugzilla.gnome.org/show_bug.cgi?id=750402
gst/mpegtsdemux/tsdemux.c