summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* lavf: add a missing bump and APIchanges for the codecpar switchAnton Khirnov2016-02-26
|
* img2: Drop av_ prefix for a static functionVittorio Giovara2016-02-24
| | | | | | This prefix is reserved for public functions only. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* lavf: add a protocol whitelist/blacklist for file opened internallyAnton Khirnov2016-02-22
| | | | | | | | Should make the default behaviour safer for careless callers that open random untrusted files. Bug-Id: CVE-2016-1897 Bug-Id: CVE-2016-1898
* urlprotocol: receive a list of protocols from the callerAnton Khirnov2016-02-22
| | | | | This way, the decisions about which protocols are available for use in any given situations can be delegated to the caller.
* aviobuf: add a private data struct for avio_open()ed contextsAnton Khirnov2016-02-22
| | | | It will be useful in the following commits.
* protocols: make the list of protocols staticAnton Khirnov2016-02-22
| | | | | Disallow other code to touch it directly, now it's only accessible through a blacklisting/whitelisting function.
* lavf: move urlcontext_child_class_next() to protocols.cAnton Khirnov2016-02-22
| | | | | It needs to access the list of protocols directly, so it more properly belongs there.
* lavf: move avio_enum_protocols() to protocols.cAnton Khirnov2016-02-22
| | | | It's a more appropriate place for it.
* lavf: reorganize URLProtocolsAnton Khirnov2016-02-22
| | | | | | | | | | Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits.
* hls: disallow opening nested files in child demuxersAnton Khirnov2016-02-22
|
* smoothstreamingenc: do not open the files as read+writeAnton Khirnov2016-02-22
| | | | They are only written to, never read.
* dashenc: eliminate ffurl_* usageAnton Khirnov2016-02-22
| | | | | Now all IO should go through the IO callbacks and be interceptable by the caller.
* lavf: use the io_open callbacks for files opened from open_input() as wellAnton Khirnov2016-02-22
| | | | There is no real reason to treat them differently.
* nutenc: do not use AVCodecContext.frame_sizeAnton Khirnov2016-02-22
| | | | | It will in general not be available. Use block_align if known or fall back to av_get_audio_frame_duration().
* matroska: Always consider S_TEXT/UTF8 as SRT when demuxingLuca Barbato2016-02-22
| | | | Reported-By: Maxim Koitsov <maksbotan@gentoo.org>
* rtpdec: Use the right logging contextDiego Biurrun2016-02-19
|
* mkv: Force the full parsing of mp3Luca Barbato2016-02-19
| | | | | | | Some muxer might or might not fit incomplete mp3 frames in their packets. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Force the full parsing of mp3Luca Barbato2016-02-19
| | | | | | | | | | | Some muxer might or might not fit incomplete mp3 frames in their packets. Bug-Id: 899 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* voc: Split ff_voc_get_packet into a separate fileDiego Biurrun2016-02-18
|
* build: Introduce iso_media componentDiego Biurrun2016-02-18
|
* build: Let the WTV demuxer select the MPEG-TS demuxerDiego Biurrun2016-02-18
| | | | | The WTV demuxer depends on large parts of the MPEG-TS demuxer internals anyway and fails to build without it.
* cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
|
* mov: Fix the format specifier type for sizeVittorio Giovara2016-02-16
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Use the correct type for sizeLuca Barbato2016-02-14
| | | | | | An AVIO offset is int64_t. Bug-Id: 921
* lavf: Dump the cpb side data informationLuca Barbato2016-02-13
|
* asfdec: make sure packet_size is non-zero before seekingAndreas Cadhalpun2016-02-07
| | | | | | | This fixes infinite loops due to seeking back. Signed-off-by: Alexandra Hájková <alexandra@khirnov.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* asfdec: check for too small size in asf_read_unknownAndreas Cadhalpun2016-02-07
| | | | | | | This fixes infinite loops due to seeking back. Signed-off-by: Alexandra Hájková <alexandra@khirnov.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* asfdec: check avio_skip in asf_read_simple_indexAndreas Cadhalpun2016-02-07
| | | | | | | | The loop can be very long, even though the file is very short. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Alexandra Hájková <alexandra@khirnov.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* asfdec: break if EOF is reached after asf_read_packet_headerAndreas Cadhalpun2016-02-07
| | | | | | | | | | | asf_read_payload can unset eof_reached, so check it also before calling that function. This fixes infinite loops. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Alexandra Hájková <alexandra@khirnov.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* yuv4mpegenc: Use AV_CEIL_RSHIFT where neededVittorio Giovara2016-01-25
|
* hls: eliminate ffurl_* usageAnton Khirnov2016-01-24
| | | | | Now all IO should go through the IO callbacks and be interceptable by the caller.
* lavf: allow custom IO for all filesAnton Khirnov2016-01-24
| | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
* riff: add C210 FourCC (Canopus C210)Piotr Bandurski2016-01-21
|
* riff: add YUYV FourCC (Drastic YUYV)Piotr Bandurski2016-01-21
|
* mov: Add an option to toggle dref openingDerek Buitenhuis2016-01-21
| | | | | | | | | This feature is mostly only used by NLE software, and is both of dubious value being enabled by default, and a possible security risk. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* flvdec: Add sanity checking of the last packet sizeMartin Storsjö2016-01-19
| | | | | | | | For http, this avoids spurious warnings about failed requests (e.g. HTTP error 416 Requested Range Not Satisfiable), if the last packet is truncated and the size read is bogus. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: perform duration search just onceMichael Niedermayer2016-01-19
| | | | | | | | When loading a truncated flv file, it would previously try to do a seek to the end of every packet read. For some input protocols (such as http), such repeated seek attempts are cripple the reading performance. Signed-off-by: Martin Storsjö <martin@martin.st>
* nutdec: only copy the header if it existsAndreas Cadhalpun2016-01-13
| | | | | | | | Fixes runtime error: null pointer passed as argument 2, which is declared to never be null Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* nuv: sanitize negative fps rateAndreas Cadhalpun2016-01-13
| | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* movenc-test: stop setting the GLOBAL_HEADER codec flagAnton Khirnov2016-01-12
| | | | | This test does no encoding, setting the flag was done just to silence the warning removed in the previous commit.
* mux: drop the warning about global headersAnton Khirnov2016-01-12
| | | | | The AVStream codec context is often not (and should not be) the actual encoding context, so this warning will be spurious in many cases.
* swfdec: support compressed swfClément Bœsch2016-01-11
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* asfdec: Fix typo in commentAlexandra Hájková2016-01-11
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* asfdec: Remove unused function parametersAlexandra Hájková2016-01-07
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: reject size > INT64_MAX in asf_read_unknownAndreas Cadhalpun2016-01-07
| | | | | | | | | | | Both avio_skip and detect_unknown_subobject use int64_t for the size parameter. This fixes a segmentation fault due to infinite recursion. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: only set asf_pkt->data_size after sanity checksAndreas Cadhalpun2016-01-07
| | | | | | | | | Otherwise invalid values are used unchecked in the next run. This can cause NULL pointer dereferencing. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Remove stray line breaks from avpriv_{report_missing_feature|request_samples}Diego Biurrun2015-12-26
|
* rtpdec_jpeg: Coalesce redundant error checksDiego Biurrun2015-12-26
|
* mpegtsenc: add flag to embed an AC-3 ES the DVB wayStefan Pöschel2015-12-14
| | | | | | | | | | | | | So far an AC-3 elementary stream is refered to in the PMT according to System A (ATSC). However System B (DVB) has a different way to signal an AC-3 ES within the PMT. This different way can be enabled by a new flag. The flag is more generally named 'system_b' as there are further differences between ATSC and DVB (e.g. the signalling of E-AC-3) which should then also be covered by it in the future. Bug-Id: 73 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>