aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * mathops: move macro to the only place it is usedVittorio Giovara2014-03-041-1/+7
| | | | | | | | This helps in disentangling lavf and lavc too.
* | Revert "mpegts: do not set pts for missing dts in video streams"Michael Niedermayer2014-03-021-4/+1
| | | | | | | | | | | | | | | | | | This reverts commit f65afef1df49f53e14c8d4173ff960fff8d44ecb. 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
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-201-2/+2
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: libavformat/mpegts: expose raw packet size Conflicts: libavformat/mpegts.c See: f9b997c337873dad99f7fd505588b260febaf32b Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat/mpegts: expose raw packet sizeLeandro Dorileo2014-02-191-0/+2
| | | | | | | | | | | | | | | | 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>
| * mpegts: add HEVC registration descriptorCarl Eugen Hoyos2013-12-121-0/+1
| |
| * mpegts: Support HEVC demuxingMickaël Raulet2013-10-311-0/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/mpegts: DVB subtitles multiple languages supportmrlika2014-02-141-23/+61
| | | | | | | | | | | | | | | | 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>
* | avformat/mpegts: Continue parsing PMTs until at least 2 streams are found or ↵Michael Niedermayer2014-01-291-2/+4
| | | | | | | | | | | | | | | | | | | | 100kb are reached 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>
* | avformat/mpegts: drop stray spaceMichael Niedermayer2014-01-291-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts demuxer: store PMT values of DVB teletext to extradataSerhii Marchuk2014-01-241-5/+40
| | | | | | | | | | | | | | | | | | * 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>
* | avformat/mpegts: demux timed ID3 metadataAnssi Hannula2013-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | avformat/mpegts: check sl.timestamp_lenMichael Niedermayer2013-12-271-0/+5
| | | | | | | | | | | | | | Fixes: msan_uninit-mem_7ff4404547ba_4883_dmbts.ts Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/mpegts: expose raw packet sizeLeandro Dorileo2013-12-191-0/+4
| | | | | | | | | | | | | | | | | | 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>
* | mpegts: stop analyzing when pmt for all programs have been foundJoakim Plate2013-12-151-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | mpegts: do not set pts for missing dts in video streamsRainer Hochecker2013-12-041-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: fix resync seekMichael Niedermayer2013-11-181-1/+3
| | | | | | | | | | | | | | | | 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>
* | mpegts: only calculate stat index when its needed during probeMichael Niedermayer2013-11-091-5/+2
| | | | | | | | | | | | 40% faster probe Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: do not hardcode type used in memset()Michael Niedermayer2013-11-091-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts: demux synchronous SMPTE 336M Key-Length-Value (KLV) metadataPeter Ross2013-10-281-0/+20
| | | | | | | | Fixes ticket #2579.
* | Support HEVC in transport streams.Carl Eugen Hoyos2013-10-161-0/+1
| |
* | hevc: add ts demux supportMickaël Raulet2013-10-151-0/+1
| | | | | | | | | | | | cherry picked from commit 925ee44364a7bce58e2ac5bac91077ce0a75d883 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/mpegts: check avio_tell() return code before using itMichael Niedermayer2013-09-261-2/+4
| | | | | | | | | | | | Fixes Ticket2962 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'Michael Niedermayer2013-09-111-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f369b9356c4606cd4d713d60f7db5de119d901fa': avformat: Use av_reallocp_array() where suitable Conflicts: libavformat/asfenc.c libavformat/gxfenc.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-101-3/+3
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/mpegts: Ensure that mpegts_get_dts() only considers packets at or ↵Michael Niedermayer2013-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | after the given position This fixes an infinite loop An alternative fix would be to revert d73cbc22c5f2c305838d9867538cf4ad59c4035f but that would worsen error resilience. Found-by: Justin Ruggles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: resync from the smallest packet size onMichael Niedermayer2013-08-181-1/+1
| | | | | | | | | | | | | | 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>
* | mpegts_get_pcr: dont loose a packet when resyncingMichael Niedermayer2013-08-181-0/+1
| | | | | | | | | | | | This matches how read_packet() works Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts: fix pos47_fullMichael Niedermayer2013-08-181-2/+3
| | | | | | | | | | | | The value was off by a packet Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: print packet size warning only if new size differs from oldMichael Niedermayer2013-08-181-1/+1
| | | | | | | | | | | | | | 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>
* | mpegts: reanalyze packet size on mismatchesMichael Niedermayer2013-08-181-0/+38
| | | | | | | | | | | | | | Fixes Ticket1812 Fixes Ticket2838 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0'Michael Niedermayer2013-08-081-4/+4
|\| | | | | | | | | | | | | | | | | | | * commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0': avio: Add const qualifiers to ffio_read_indirect Conflicts: libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add const qualifiers to ffio_read_indirectBen Avison2013-08-081-4/+4
| | | | | | | | | | | | | | This provides at least some protection against potential accidental corruption of AVIO buffer workspace. Signed-off-by: Martin Storsjö <martin@martin.st>
* | mpegts: remove usage of MOD_UNLIKELY()Michael Niedermayer2013-08-061-6/+6
| | | | | | | | | | | | Its not needed and doing nothing is faster than doing a optimized MOD Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae'Michael Niedermayer2013-08-061-1/+4
|\| | | | | | | | | | | | | * commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae': mpegts: Remove one 64-bit integer modulus operation per packet Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegts: Remove one 64-bit integer modulus operation per packetBen Avison2013-08-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855'Michael Niedermayer2013-08-061-0/+11
|\| | | | | | | | | | | | | * commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855': mpegts: Make discard_pid() faster for single-program streams Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegts: Make discard_pid() faster for single-program streamsBen Avison2013-08-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | When a stream contains a single program, there's no point in doing a PID -> program lookup. Normally the one and only program isn't disabled, so no packets should be discarded. Before After Mean StdDev Mean StdDev Change discard_pid() 73.8 9.4 20.2 1.5 +264.8% Overall 2300.8 28.0 2253.1 20.6 +2.1% Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'cabb1681697555e2c319c37c1f30f149207e9434'Michael Niedermayer2013-08-061-13/+28
|\| | | | | | | | | | | | | | | | | | | * commit 'cabb1681697555e2c319c37c1f30f149207e9434': mpegts: Remove one memcpy per packet Conflicts: libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegts: Remove one memcpy per packetBen Avison2013-08-051-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was being performed to ensure that a complete packet was held in contiguous memory, prior to parsing the packet. However, the source buffer is typically large enough that the packet was already contiguous, so it is beneficial to return the packet by reference in most cases. Before After Mean StdDev Mean StdDev Change memcpy 720.7 32.7 649.8 25.1 +10.9% Overall 2372.7 46.1 2291.7 21.8 +3.5% Signed-off-by: Martin Storsjö <martin@martin.st>
* | mpegts: add fix_teletext_pts mpegts demuxer optionMarton Balint2013-08-061-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | mpegts: save last pcr of pcr pids in PES ContextMarton Balint2013-08-021-3/+17
| | | | | | | | | | | | | | | | 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>
* | mpegts: only reopen pmt_cb filter if its different from the previous.Michael Niedermayer2013-07-051-3/+9
| | | | | | | | | | | | Fixes Ticket2632 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts: use ffio_ensure_seekback()Michael Niedermayer2013-07-041-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts: use seek_back() for all seek backsMichael Niedermayer2013-06-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts: factor seek_back() outMichael Niedermayer2013-06-301-5/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mpegts_read_header: goto fail instead of return directlyMichael Niedermayer2013-06-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b164d66e35d349de414e2f0d7365a147aba8a620'Michael Niedermayer2013-03-151-0/+1
|\| | | | | | | | | | | | | | | * commit 'b164d66e35d349de414e2f0d7365a147aba8a620': ape: make version-dependent decoding functions called via pointers mpegts: add support for stream_type 0x42, which is CAVS Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegts: add support for stream_type 0x42, which is CAVSCan Wu2013-03-151-0/+1
| | | | | | | | | | | | This allows demuxing and muxing of CAVS TS streams. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '1ecdf8912b9ced51b3267cdcdce5e394d0a3bf8e'Michael Niedermayer2013-03-141-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit '1ecdf8912b9ced51b3267cdcdce5e394d0a3bf8e': avformat: av_log_ask_for_sample() ---> avpriv_request_sample() Conflicts: libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>