Commit graph

17 commits

Author SHA1 Message Date
Edward Hervey fcf87ef2bf mpegtsdemux: Fix wrong usage of '<<' operator
Detected by GCC 7.

Add comments for clarity

https://bugzilla.gnome.org/show_bug.cgi?id=779333
2017-02-28 09:27:41 +01:00
Tim-Philipp Müller f0358aac16 tsdemux: remove unnecessary check
This is not public API, use g_assert() instead of
g_return_if_fail(), so that it's compiled out in
releases. It's only called from our code, with &foo.
2015-07-08 14:50:00 +01:00
Amaury Medeiros 44a87d2109 tsdemux: Fix flags comparison operator precedence
Fix operator precedence, so the whole operation is
negated instead of only flags variable.

https://bugzilla.gnome.org/show_bug.cgi?id=722096
2014-01-28 13:56:44 +01:00
Edward Hervey 21ebc7708d pesparse: Refactory secondary PES extension handling
Some streams had wrong values for the stream_id_extension, make sure
we only remember the valid ones.

For streams with PES_extension_field_length == 0, assume there's nothing
else.

For streams that state they have a TREF extension but don't have enough
data to store it, just assume it was produced by a non-compliant muxer
and skip the remaining data.

Only store remaining data in stream_id_extension_data instead of storing
data we already parse.
2013-08-14 13:41:37 +02:00
Edward Hervey ddee83ef0b pesparse: Fix pes extension data length check
And remove length/data updates (we use the header size just below to
properly set them).

Based on feedback from Stas Sergeev <stsp@list.ru>

https://bugzilla.gnome.org/show_bug.cgi?id=657343
2013-08-14 10:39:46 +02:00
Edward Hervey 5208b8a050 pesparse: Remove unused argument
We always provided 0 as the offset and never used the returned value.

Based on feedback from Stas Sergeev <stsp@list.ru>

https://bugzilla.gnome.org/show_bug.cgi?id=657343
2013-08-14 10:33:14 +02:00
Edward Hervey 8c60e42070 mpegtsdemux: Add more flag debugging for PES and TS packets
Helps with debugging issues. And also remove unused variable (opcr)

This will also allow us in the future to properly detect:
* random-access location (to enable keyframe observation and
  potentially seeking
* discont location (to properly handle resets)
* splice location (to properly handle new stream changes)
2013-07-26 08:17:17 +02:00
Edward Hervey dbe350d380 pesparse: Demote a Warning
We actually now know what to do ... have a log message :)
2013-07-26 06:46:41 +02:00
Sebastian Dröge acacef9fbb mpegtsdemux: Fix various compiler warnings 2013-03-03 12:30:32 +01:00
Tim-Philipp Müller 9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller 465374f3c8 tsdemux: fix program packet sequence counter parsing in PES header 2012-10-19 01:05:44 +01:00
Tim-Philipp Müller 10c881b107 tsdemux: fix some inconsequential PES header parsing issues
additional_copy_info: need to get rid of the highest
bit, not the lowest one

program_packet_sequence_counter: also need to get rid
of the highest bit instead of multiplying with a random
value

original_stuff_length: want to AND 0x3f to extract the
lowest 6 bits, not multiply by it.

None of these fields are actually used though, so these
should not have caused any issues.
2012-10-19 01:05:34 +01:00
Raimo Järvi 9640669689 tsdemux: Fix parsing P-STD_buffer in PES header
https://bugzilla.gnome.org/show_bug.cgi?id=686294
2012-10-19 00:29:40 +01:00
Edward Hervey b6732a27d3 pesparse: Be a bit more permissive with PTS/DTS parsing
According to the specifications a PTS_DTS_flags value of 0x01 is forbidden.
... but there are some rare files out there that do that.

Instead of erroring out, let's warn, carry on parsing accordingly.

If the packet is really corrupted there are enough checks afterward to
detect that.
2012-05-26 15:54:41 +02:00
Edward Hervey d0e8427b4e pesparse: Fix stuffing byte handling
We in fact get the size of the header (including stuffing bytes), therefore
use that instead of trying to skip 0xff bytes ourselves since some media
streams do start with 0xff (like mpeg audio's initial 0xfff).
2011-07-20 19:19:13 +02:00
Alessandro Decina 2b7e9abc59 mpegtsdemux: fix compiler warnings 2011-07-20 08:59:25 +02:00
Edward Hervey 6f9a6cc2ba mpegtsdemux: Add standalone PES parser 2011-07-18 09:13:14 +02:00