summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
Commit message (Collapse)AuthorAge
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegts: Add jpeg2000 stream typeJohn Högberg2015-06-30
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mpegts: Update the PSI/SI table only if the version changeJohn Högberg2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | | If a PAT is finished while a PMT section filter is opened but not yet finished, the PMT section filter is closed and all the received data is discarded. This is usually not an issue but some multiplexers (With very quick PAT/PMT repetition settings) consistently emit a PMT section start, then a PAT, and then the rest of the PMT, causing the aforementioned behavior to result in no PMT being finished. In the most pathologic situation the stream information are lost and the probe fallback miscategorizes subtitles as mp3 audio. Avoid the issue through eliminating redundant PSI/SI table updates by checking their version field, which is required by the standard to be incremented on every change no matter how minor. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* mpegts: relax restrictions on matching the packet start in read_headerAnton Khirnov2015-02-10
| | | | | | | | | | | analyze() is currently called both when probing and from read_header(). It determines the packet start by looking for the sync byte, followed by unset Transport Error Indicator and valid adaptation_field_control. This makes sense to do when probing, but once we already know the format is MPEG-TS, it is counterproductive to be so strict -- e.g. in some files the TEI might be set and analyze() might get called with a smaller buffer than the one used for probing, resulting in a failure.
* lavf: remove unused codewm42015-02-08
| | | | | | | | | | | | | Nothing uses it, and it provides no public API. Archeological finds: Commit 101036adb9 added the API. Commit a8dd8dc6e9 made mpegts.c use it. Commit af8aae3fa3 disabled it by default in mpegts.c. Commit ae2bb52cd2 removed all uses of this from mpegts.c. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: add support for OpusKieran Kunhya2014-12-20
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: check get16() return valueVittorio Giovara2014-12-18
| | | | | | | And break flow of execution rather than exiting the function. CC: libav-stable@libav.org Bug-Id: CID 732186
* mpegts: Allow custom max resync sizeLuca Barbato2014-09-03
|
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mpegts: do not export empty language tagsJan Gerber2014-07-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: pass MpegTSContext ptr explicitlyAlexander V. Lukyanov2014-07-10
| | | | | | | | | | | | | | AVFormatContext->priv_data is not always a MpegTSContext, it can be RTSPState when decoding a RTP stream. So it is necessary to pass MpegTSContext pointer explicitly. Within libav, the write_section_data function doesn't actually use the MpegTSContext at all, so this doesn't change anything at the moment (no memory was corrupted before), but it reduces the risk of anybody trying to touch the MpegTSContext via AVFormatContext->priv_data in the future. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Forward error codes in various functionsKeiji Costantini2014-03-18
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpegts: K&R formatting cosmeticsKeiji Costantini2014-03-18
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mathops: move macro to the only place it is usedVittorio Giovara2014-03-04
| | | | This helps in disentangling lavf and lavc too.
* libavformat/mpegts: expose raw packet sizeLeandro Dorileo2014-02-19
| | | | | | | | 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-12
|
* mpegts: Support HEVC demuxingMickaël Raulet2013-10-31
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avio: Add const qualifiers to ffio_read_indirectBen Avison2013-08-08
| | | | | | | This provides at least some protection against potential accidental corruption of AVIO buffer workspace. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Remove one 64-bit integer modulus operation per packetBen Avison2013-08-05
| | | | | | | | | | | | | 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>
* mpegts: Make discard_pid() faster for single-program streamsBen Avison2013-08-05
| | | | | | | | | | | | | 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>
* mpegts: Remove one memcpy per packetBen Avison2013-08-05
| | | | | | | | | | | | | | 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 support for stream_type 0x42, which is CAVSCan Wu2013-03-15
| | | | | | This allows demuxing and muxing of CAVS TS streams. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: av_log_ask_for_sample() ---> avpriv_request_sample()Diego Biurrun2013-03-13
|
* av_log_missing_feature() ---> avpriv_report_missing_feature()Diego Biurrun2013-03-13
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* mpegts: Share the cleanup code between the demuxer and lavf-internal parser ↵Martin Storsjö2013-01-20
| | | | | | | | | | | | | functions The lavf-internal parser functions are used when receiving mpegts over RTP. This fixes memory leaks in this setup. The normal mpegts demuxer close function was updated in ec7d0d2e in 2004 to fix leaks, but the parsing function used for RTP wasn't updated and has been leaking ever since. Signed-off-by: Martin Storsjö <martin@martin.st>
* bitstream: add get_bits64() to support reading more than 32 bits at onceMichael Niedermayer2012-12-07
| | | | | | | Also remove a duplicate function in the MPEG-TS demuxer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* mpegts: Drop pointless casting of hex_dump_debug argumentsDiego Biurrun2012-10-01
|
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* mpegts: check substreams before discardingChristian Schmidt2012-09-12
| | | | | | Allow to extract the AC3 core from TrueHD with the "copy" codec. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* mpegts: remove unused/incomplete/broken seeking codeRonald S. Bultje2012-06-19
|
* mpegts: Remove disabled extension matching probe.Alex Converse2012-06-07
|
* mpegts: Some additional HDMV types and reg descriptors for mpegtsJoakim Plate2012-05-03
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mpegts: Make sure we don't return uninitialized packetsMartin Storsjö2012-04-27
| | | | | | | | | This fixes crashes, where the demuxer could return 0 even if the returned AVPacket isn't initialized at all. This could happen if running into EOF or running out of probesize with non-seekable sources. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Try seeking back even for nonseekable protocolsMartin Storsjö2012-04-23
| | | | | | | | | | | | | | | | | The mpegts demuxer reads 5 KB at startup just for discovering the packet size. Since the default avio buffer size is 32 KB, the seek back to the start will in most cases be within the avio buffer, and will in most cases succeed even if the actual protocol isn't seekable. This makes the demuxer startup faster/with less data when reading data from a non-seekable input, by not skipping the first few KB. If it fails, don't warn if the protocol isn't seekable, making it behave as before in the failure case. Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-06
| | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Fix dead error checksAlex Converse2012-03-26
|
* mpegts: Always honor a registration descriptor if present and there is no ↵Alex Converse2012-03-09
| | | | other codec information.
* mpegts: Pad the packet buffer in handle_packet().Alex Converse2012-03-02
| | | | | | | This allows it to be used with get_bits without the thread of overreads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* mpegts: Do not call read_sl_header() when no bytes remain in the buffer.Alex Converse2012-03-02
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* mpegts: Suppress invalid timebase warnings on DMB streams.Alex Converse2011-12-20
| | | | timestamp_len and timestamp_res intialize to zero.
* mpegts: Fix typo in handling sections in the PMT.Alex Converse2011-12-20
| | | | | This was an error rebasing 4682a1dc3aa2554ad7077f5db32d0f2d598d018e for commit. The "pes" variable guaranteed to be NULL in that block.
* mpegts: replace some magic numbers with the existing defineVladimir Pantelic2011-12-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>