* commit '5397386effba2e53e4ff82852a86f6be4d59e9c1':
mathops: move macro to the only place it is used
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This reverts commit f65afef1df.
If only pts is coded then dts must be equal pts
See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5
Found-by: Baptiste Coudurier
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Copy multiple languages data from PMT to extradata. New 5 bytes
per language extradata format.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This (ugly) hack fixes Ticket3348
If someone has an idea on how to fix this nicer, that would be very welcome
but the stream contains several PMTs with just one of the 2 streams at the start
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Using extradata by TS demuxer to store values from PMT
* Support of multiple languages in one DVB teletext stream:
comma separated language codes in metadata "language" field
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Used in some HLS streams ("Timed Metadata for HTTP Live Streaming").
This is just ID3 tags at arbitrary stream positions, but I still added
"timed" to the codec name to avoid confusion with regular non-stream ID3
tags.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This disables NOHEADER after finding PMT for all programs to
avoid find_stream_info always exhausting probe size for mpegts.
This is very important for live streams since read speed
will be limited. rtsp, udp and any protocol streaming a live
mpegts will have dramatically faster startup time.
Note, lack of codec parameters for streams can still cause
the full probe size to be exhausted.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The seek ended up seeking before the begin, which caused problems
Fixes initial sync issues with libbluray
Fixes Ticket3117
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This fixes an infinite loop
An alternative fix would be to revert d73cbc22c5
but that would worsen error resilience.
Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
No case is known to have triggered this, but its more correct to check that the
new size differs.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855':
mpegts: Make discard_pid() faster for single-program streams
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'cabb1681697555e2c319c37c1f30f149207e9434':
mpegts: Remove one memcpy per packet
Conflicts:
libavformat/mpegts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Changes since v1 of the patch:
- enable option by default
- add documentation
- move up PTS override code after PES header parsing, to ensure we use the
last PCR before the first packet of the teletext PES packet.
The option overrides teletext packet PTS and DTS values with the timestamps
calculated from the PCR of the first program which the teletext stream is part
of and is not discarded.
Using the same teletext PID for multiple programs is possible, therefore we
need some kind of heuristics to know which program PCR we should synchronize
to. Using the first non-discarded PCR pid among the programs of the teletext
stream seemed like a good choice.
The patch does not do PCR interpolation to estimate the PCR of the teltetext
packet, it just uses the last PCR of the program, which may cause a slight
error (0.1 sec) in the teletext packet pts-es.
Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The common case of the pointer having increased by one packet (which results
in no change to the modulus) can be detected with a 64-bit subtraction,
which is far cheaper than a division on many platforms.
Before After
Mean StdDev Mean StdDev Change
Divisions 248.3 8.8 51.5 7.4 +381.7%
Overall 2773.2 25.6 2372.5 43.1 +16.9%
Signed-off-by: Martin Storsjö <martin@martin.st>