summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* unix: Use rw_timeout for setting the connect timeoutMartin Storsjö2016-03-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* tcp: Use rw_timeout for setting the connect/listen timeoutsMartin Storsjö2016-03-24
| | | | | | | | Apply the default value for timeout in code instead of via the avoption, to allow distinguishing the default value from the user not setting anything at all. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Copy URLContext generic options into child URLContextsMartin Storsjö2016-03-24
| | | | | | | | | | | | | | | Since all URLContexts have the same AVOptions, such AVOptions will be applied on the outermost context only and removed from the dict, while they probably make sense on all contexts. This makes sure that rw_timeout gets propagated to the innermost URLContext (to make sure it gets passed to the tcp protocol, when opening a http connection for instance). Alternatively, such matching options would be kept in the dict and only removed after the ffurl_connect call. Signed-off-by: Martin Storsjö <martin@martin.st>
* file: Add an option for following a file that is being writtenMartin Storsjö2016-03-24
| | | | | | | | Using this requires setting the rw_timeout option to make it terminate, alternatively using the interrupt callback (if used via the API). Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Add an option 'rw_timeout'Andrey Utkin2016-03-24
| | | | | | | | | | | If set non-zero, this limits duration of the retry_transfer_wrapper() loop, thus affecting ffurl_read*(), ffurl_write(). As soon as one single byte is successfully received/transmitted, the timer restarts. This has further changes by Michael Niedermayer and Martin Storsjö. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Apply avoptions on the URLContext itself as wellMartin Storsjö2016-03-24
| | | | | | | Currently the list of avoptions for URLContext is empty though, but such options will be added. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: use new decode APIwm42016-03-23
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-03-23
| | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* build: Add component for the SRTP common codeDiego Biurrun2016-03-23
| | | | This allows expressing the SRTP test code dependencies more clearly.
* nuv: Use the correct context for av_image_check_sizeVittorio Giovara2016-03-22
|
* mpegts: Forward the errors on mpeg4 objects parsingLuca Barbato2016-03-20
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* matroska: Support V_QUICKTIME as written in the specificationLuca Barbato2016-03-15
| | | | | | | | | | | | Check if the size is written the first 4 bytes and read the next 4 as fourcc candidate, fallback checking the initial for 4 bytes. "The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file after the mandatory video descriptor structure (starting with the size and FourCC fields)" CC: libav-stable@libav.org
* mov: Check the entries value when parsing dref boxesLuca Barbato2016-03-11
| | | | | | | | | And properly reset the entries count when resetting the entries. CC: libav-stable@libav.org Bug-Id: 929 Bug-Id: CVE-2016-3062
* mov: Trim dref absolute pathVittorio Giovara2016-03-05
| | | | | | | | | | | | | Samples produced by Omneon (Harmonic) store external references with paths ending with 0s. Such movs cannot be loaded properly since every 0 is converted to '/', to keep the same parsing code for dref type 2 and type 18: this makes the external reference point to a non-existing direactory, rather than to the actual referenced file. Add a brief trimming loop that drops all ending 0s before trying to parse the external reference path. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* asfenc: remove an unused variableAnton Khirnov2016-03-05
|
* asfenc: fix some possible integer overflowsAnton Khirnov2016-03-05
| | | | | | | | | | Store the file duration in the same timebase it arrives (i.e. milliseconds) and only convert it to the file duration units (100ns) when it's actually written, thus simplifying some calculations. Also, store the duration as unsigned, since it cannot be negative. CC: libav-stable@libav.org Bug-ID: CVE-2016-2326
* avformat_find_stream_info: move duration guessing after updating codec ↵Anton Khirnov2016-03-04
| | | | | | | | parameters This bitrate might not be known otherwise. Bug-Id: 926
* sdp: fix opus sprop-stereo fmtp syntaxMark Harris2016-03-01
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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.