mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
mpegtsdemux: Avoid parsing section without enough data
This is actually a workaround (we'll be skipping the upcoming section) This will only happen for sections where the beginning is located within the last 8 bytes of a packet (which is the minimum we need to properly identify any section beginning). Later we should figure out a way to store those bytes and mark that some analysis needs to happen. The probability of this happening is too low for me to care right now and do that fix. There is a good chance that section will eventually be repeated and won't end up on such border.
This commit is contained in:
parent
0ef3e3c7d2
commit
8ca1751f00
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue