tagdemux: ensure tags have been fetched before pulling data
authorThiago Santos <thiagoss@osg.samsung.com>
Wed, 18 Feb 2015 23:58:15 +0000 (20:58 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Thu, 19 Feb 2015 00:00:50 +0000 (21:00 -0300)
commitcd071014209d167ca8664a47249bdc4a9cb89866
treea6a19397453f781860722a9759b1acfbf58f44eb
parent2813e08210c04ae7de60e67af3ed81c5b65b1723
tagdemux: ensure tags have been fetched before pulling data

Otherwise upstream can get confused about offsets as there will
be a jump once the tags have been parsed due to the stripped area.

If upstream pulls from 0 to 100, and then tagdemux does the
tag reading and finds out that the first 200 bytes are the tag, the
next pull from upstream will have an offset of 200 bytes. So
upstream will get the following data:

0 - 100, 300 - (EOS), as it will continue requesting from where
it has last stopped, but tagdemux will add an offset to skip the
tags.

This patch makes sure that the tags have been parsed and skipped
since the first pull range call.

https://bugzilla.gnome.org/show_bug.cgi?id=744580
gst-libs/gst/tag/gsttagdemux.c