smoothstreaming: clear live adapter on seek
authorHosang Lee <hosang10.lee@lge.com>
Tue, 16 Jun 2020 02:16:37 +0000 (11:16 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 30 Sep 2020 11:48:02 +0000 (11:48 +0000)
commitf7a8ece5ef36b1ba9d3f8cbd283817bf5d24daf0
tree19305a36d0ed83745aebabc697c0c703a707da94
parentcd618f19b94bf659e108c3aa0daa4c7e61ec6a4c
smoothstreaming: clear live adapter on seek

In live streaming, buffers sent by souphttpsrc are pushed to the live
adapter. The buffers in the adapter are sent out of mssdemux when it
is greater than 4096 bytes.

Occasionally, when seeking in live streams, if seek occurs just
after the last data chunk was received, and if this data chunk is
smaller than 4096 bytes, it will be kept in the live adapter.
This remaining data in the live adapter will be erroneously prepended
to the new data that is downloaded after seek and pushed out.
When qtdemux receives this data, since it does not start with
a moof box, it is impossible to demux the fragment, and bogus
size error will occur.

Clear out the live adapter on seek so that no unnecessary remaining
data is pushed out together with the new fragment after seeking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1345>
ext/smoothstreaming/gstmssmanifest.c
ext/smoothstreaming/gstmssmanifest.h