mpegtsdemux: Fix multiple-SI detection/parsing
authorEdward Hervey <edward@collabora.com>
Sun, 7 Jul 2013 06:29:37 +0000 (08:29 +0200)
committerEdward Hervey <edward@collabora.com>
Sun, 7 Jul 2013 06:29:37 +0000 (08:29 +0200)
commitf58f13e874d2c744942b3e54434495cec54ad937
tree30d881cfb83f39457b21f368b0dfa2c027b7db93
parent513417e0ff5e41391e4ab1941e051ab98e427eaf
mpegtsdemux: Fix multiple-SI detection/parsing

We had two issues with the previous code:
1) We were badly handling PUSI-flagged packets. We were discarding the
   initial data (if pointer != 0) whereas we should have been accumulating
   it with the previous data (if there was a continuity of course).
   => First series of information loss
2) We were not checking whether there were more sections after the end
   of one (i.e. when the following byte was not a stuff byte).

This fixes those two issues.

Fixes #677443

https://bugzilla.gnome.org/show_bug.cgi?id=677443
gst/mpegtsdemux/mpegtsbase.c
gst/mpegtsdemux/mpegtspacketizer.c
gst/mpegtsdemux/mpegtspacketizer.h