mpegtsmux: restore stream creation order
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 27 Feb 2019 17:47:09 +0000 (18:47 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Wed, 27 Feb 2019 18:00:36 +0000 (19:00 +0100)
commit91c76b085173b06974e3b7caa4a604dfee1abcb7
tree0d7a836f6c97fe3baeb7bdf39d392a15c1e471cd
parenta751b33072055e069d1adba3ac9eb881d804d759
mpegtsmux: restore stream creation order

In 7c767f3fcd5a7b40d205bb4d588dad6c6275c729 , stream creation was
refactored to occur before potential program creation. This created
issues with pipelines such as:

gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=640, framerate=25/1 ! \
x264enc ! hlssink2 target-duration=1

eg.: gst_buffer_copy_into: assertion 'bufsize >= offset + size' failed

As this reordering was actually not needed for the purpose of allowing
to specify a PCR stream, this reverts the reordering part of the
initial commit.
gst/mpegtsmux/mpegtsmux.c