streamsplitter/combiner: Drain encoder before switching branch
authorThibault Saunier <tsaunier@igalia.com>
Sat, 4 Jul 2020 16:29:06 +0000 (12:29 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 22 Jul 2020 16:01:25 +0000 (16:01 +0000)
commit871fa29639220a98952751e545d7555215874d37
tree0791d03c8d3778f84a87b311186dc93b14219094
parenta31158012bbeded0f886ab627254d4c650e88cb3
streamsplitter/combiner: Drain encoder before switching branch

Otherwise we miht have frames queued in the encoder from the old branch
that do not get encoded/muxed when they should.

The implementation is a bit 'weird' but the rational and solution
is documented in the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/751>
gst/encoding/gststreamcombiner.c
gst/encoding/gststreamcombiner.h
gst/encoding/gststreamsplitter.c