summaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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 <[email protected]>
* | avformat/mpegts: drop stray spaceMichael Niedermayer2014-01-291-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | mpegts: do not set pts for missing dts in video streamsRainer Hochecker2013-12-041-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | mpegts: only calculate stat index when its needed during probeMichael Niedermayer2013-11-091-5/+2
| | | | | | | | | | | | 40% faster probe Signed-off-by: Michael Niedermayer <[email protected]>
* | avformat/mpegts: do not hardcode type used in memset()Michael Niedermayer2013-11-091-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+1
| | | | | | | | Signed-off-by: Paul B Mahol <[email protected]>
* | avformat/mpegts: check avio_tell() return code before using itMichael Niedermayer2013-09-261-2/+4
| | | | | | | | | | | | Fixes Ticket2962 Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
| * avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-101-3/+3
| | | | | | | | Signed-off-by: Diego Biurrun <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]>
* | mpegts: fix pos47_fullMichael Niedermayer2013-08-181-2/+3
| | | | | | | | | | | | The value was off by a packet Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | mpegts: reanalyze packet size on mismatchesMichael Niedermayer2013-08-181-0/+38
| | | | | | | | | | | | | | Fixes Ticket1812 Fixes Ticket2838 Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
| * 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ö <[email protected]>
* | 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 <[email protected]>
* | 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 <[email protected]>
| * 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ö <[email protected]>
* | Merge commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855'Michael Niedermayer2013-08-061-0/+11
|\| | | | | | | | | | | | | * commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855': mpegts: Make discard_pid() faster for single-program streams Merged-by: Michael Niedermayer <[email protected]>
| * 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ö <[email protected]>
* | 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 <[email protected]>
| * 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ö <[email protected]>
* | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
* | mpegts: use ffio_ensure_seekback()Michael Niedermayer2013-07-041-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | mpegts: use seek_back() for all seek backsMichael Niedermayer2013-06-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | mpegts: factor seek_back() outMichael Niedermayer2013-06-301-5/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | mpegts_read_header: goto fail instead of return directlyMichael Niedermayer2013-06-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | 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 <[email protected]>
| * 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 <[email protected]>
* | 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 <[email protected]>
| * avformat: av_log_ask_for_sample() ---> avpriv_request_sample()Diego Biurrun2013-03-131-1/+1
| |
* | Merge commit '63d744e2be39466e3a734c2987cd713e0bac101e'Michael Niedermayer2013-03-141-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '63d744e2be39466e3a734c2987cd713e0bac101e': av_log_missing_feature() ---> avpriv_report_missing_feature() Conflicts: libavcodec/aacdec.c libavcodec/tta.c libavformat/mpegts.c Merged-by: Michael Niedermayer <[email protected]>
| * av_log_missing_feature() ---> avpriv_report_missing_feature()Diego Biurrun2013-03-131-1/+1
| |
* | mpegts: clear avprograms only for removed programsMichael Niedermayer2013-03-101-3/+11
| | | | | | | | | | | | | | Fixes Ticket2186 Requested-by: carl Signed-off-by: Michael Niedermayer <[email protected]>
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-081-8/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <[email protected]>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-081-8/+10
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | Only try to auto-detect LATM in mpegts if the LOAS demuxer was configured.Carl Eugen Hoyos2013-01-241-1/+3
| | | | | | | | This allows to decode LATM-in-mpegts without the LOAS demuxer.