summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux/mpegtspacketizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/mpegtsdemux/mpegtspacketizer.c')
-rw-r--r--gst/mpegtsdemux/mpegtspacketizer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index 0c1841dd8..2432469c2 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -972,7 +972,9 @@ accumulate_data:
res = section;
}
- if (data == packet->data_end || *data == 0xff) {
+ /* FIXME : We need at least 8 bytes with current algorithm :(
+ * We might end up losing sections that start across two packets (srsl...) */
+ if (data > packet->data_end - 8 || *data == 0xff) {
/* flush stuffing bytes and leave */
mpegts_packetizer_clear_section (stream);
goto out;