summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-0817-74/+112
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* mp3dec: Fix VBR bit rate parsingAlexander Kojevnikov2013-03-081-2/+4
| | | | | | | | | | | | When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag. When parsing the stream, don't override the bit rate if it's already set, otherwise calculate the mean bit rate from parsed frames. This way, the bit rate will be set correctly both for CBR and VBR streams. CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-078-17/+15
| | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Initialize some variables to silence compiler warningsMartin Storsjö2013-03-022-2/+2
| | | | | | | | The warnings are false positives, older gcc versions (such as 4.5) think the variables can be used uninitialized while they in practice can't, while newer (4.6) gets it right. Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Check the return value of a mallocMartin Storsjö2013-03-021-2/+6
| | | | | | | | | | The callers of this function can't report errors sanely. If this one malloc fails, don't write the extradata byte, make sure we try to malloc it the next time we're called instead, and make sure we still consume the input data byte. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Don't read the VP6 header byte when setting codec type based on metadataMartin Storsjö2013-03-021-7/+9
| | | | | | | | | This header byte is only present when actually reading a VP6 frame, not when reading the codec type field in the metadata. This potential bug has been present since 5b54a90c. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add a fate test for the noproxy pattern matchingMartin Storsjö2013-02-272-1/+45
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Handle the environment variable no_proxy more properlyMartin Storsjö2013-02-275-9/+65
| | | | | | | | | | | | | | | | | | | | The handling of the environment variable no_proxy, present since one of the initial commits (de6d9b6404), is inconsistent with how many other applications and libraries interpret this variable. Its bare presence does not indicate that the use of proxies should be skipped, but it is some sort of pattern for hosts that does not need using a proxy (e.g. for a local network). As investigated by Rudolf Polzer, different libraries handle this in different ways, some supporting IP address masks, some supporting arbitrary globbing using *, some just checking that the pattern matches the end of the hostname without regard for whether it actually is the right domain or a domain that ends in the same string. This simple logic should be pretty similar to the logic used by lynx and curl. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: use the format context for logging.Anton Khirnov2013-02-231-1/+1
| | | | CC:libav-stable@libav.org
* asfdec: do not assume every AVStream has a corresponding ASFStreamAnton Khirnov2013-02-091-5/+6
| | | | | | | This won't be true for ID3 attached picture. Also stop allocating now useless dummy ASFStreams for ASF native attached pictures.
* asfdec: support reading ID3v2 tags in ASF filesVladimir Pantelic2013-02-091-3/+19
| | | | | | | Yes, these files do exist Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: also read Metadata Library ObjectVladimir Pantelic2013-02-093-0/+11
| | | | | | | | In some ASF files this objects holds cover art and other tags. Compared to Metadata Object it can also hold GUIDs, but we ignore these for now. Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: read the full Metadata Object, not just aspect ratio informationVladimir Pantelic2013-02-091-24/+27
| | | | | | | | Use the same get_tag()/get_value() as for the Extended Content Description but handle the 16 bit vs 32 bit difference for type 2 (BOOL) Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: silence a warningVladimir Pantelic2013-02-091-1/+1
| | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asf: K&R formatting cosmeticsDiego Biurrun2013-02-064-508/+552
|
* Use proper "" quotes for local header #includesDiego Biurrun2013-02-011-1/+1
|
* bink demuxer: set framerate.Anton Khirnov2013-02-011-0/+1
|
* bink demuxer: check malloc return valueAnton Khirnov2013-02-011-0/+2
|
* avisynth: Change demuxer name to avoid conflicts with AVSDiego Biurrun2013-01-311-1/+1
|
* movenc: Simplify code by using avio_wb24Martin Storsjö2013-01-301-2/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mvi: set framerateAnton Khirnov2013-01-291-0/+1
| | | | This container does not store timestamps and thus supports CFR only.
* rtpenc_chain: Use the original AVFormatContext for getting payload typeMartin Storsjö2013-01-241-1/+1
| | | | | | | | | | | | | | | | | In ff_rtp_get_payload_type, the AVFormatContext is used for checking whether the payload_type or rtpflags options are set. In rtpenc_chain, the rtpctx struct is a newly initialized struct where no options have been set yet, so no options can be fetched from there. All muxers that internally chain rtp muxers have the "rtpflags" field that allows passing such options on (which is how this worked before 8034130e06), so this works just as intended. This makes it possible to produce H263 in RFC2190 format with chained RTP muxers. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Make sure the output format pointer is setMartin Storsjö2013-01-241-1/+1
| | | | | | | | Not sure if this actually happens, but we do the same check when checking payload_type further above in the function, so it might be needed. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Make sure priv_data is set before reading itMartin Storsjö2013-01-231-1/+1
| | | | | | | This fixes crashes with muxing H263 into RTSP. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: fix overflow checking in avc_mp4_find_startcode()Xi Wang2013-01-231-2/+2
| | | | | | | | | | | | The check `start + res < start' is broken since pointer overflow is undefined behavior in C. Many compilers such as gcc/clang optimize away this check. Use `res > end - start' instead. Also change `res' to unsigned int to avoid signed left-shift overflow. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: fix buffer overflows in ff_amf_tag_contents()Xi Wang2013-01-231-6/+5
| | | | | | | | | | | | | | A negative `size' will bypass FFMIN(). In the subsequent memcpy() call, `size' will be considered as a large positive value, leading to a buffer overflow. Change the type of `size' to unsigned int to avoid buffer overflow, and simplify overflow checks accordingly. Also change a literal buffer size to use sizeof, and limit the amount of data copied in another memcpy call as well. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: fix multiple broken overflow checksXi Wang2013-01-231-6/+6
| | | | | | | | | | | | Sanity checks like `data + size >= data_end || data + size < data' are broken, because `data + size < data' assumes pointer overflow, which is undefined behavior in C. Many compilers such as gcc/clang optimize such checks away. Use `size < 0 || size >= data_end - data' instead. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Start the sequence numbers from a random offsetMartin Storsjö2013-01-223-3/+11
| | | | | | | | Expose the current sequence number via an AVOption - this can be used both for setting the initial sequence number, or for querying the current number. Signed-off-by: Martin Storsjö <martin@martin.st>
* avidec: use sensible error codes instead of -1Jindrich Makovicka2013-01-211-19/+22
| | | | | | | | Use AVERROR_INVALIDDATA on invalid inputs, and AVERROR_EOF when no more frames are available in an interleaved AVI. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* srtp: Move a variable to a local scopeMartin Storsjö2013-01-211-2/+2
| | | | | | This simplifies the code slightly. Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Add tests for the crypto suite with 32/80 bit HMACMartin Storsjö2013-01-211-0/+32
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: cosmetics: Use fewer lines for the test vectorsMartin Storsjö2013-01-211-22/+8
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Don't require more input data than what actually is neededMartin Storsjö2013-01-211-2/+6
| | | | | | | | | | The theoretical minimum for a (not totally well formed) RTCP packet is 8 bytes, so we shouldn't require 12 bytes as minimum input. Also return AVERROR_INVALIDDATA instead of 0 if something that is not a proper packet is given. Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Improve the minimum encryption buffer size checkMartin Storsjö2013-01-211-6/+10
| | | | | | | This clarifies where the limit number comes from, and only requires exactly as much padding space as will be needed. Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Add support for a few DTLS-SRTP related crypto suitesMartin Storsjö2013-01-213-13/+23
| | | | | | | | The main difference to the existing suites from RFC 4568 is that the version with a 32 bit HMAC still uses 80 bit HMAC for RTCP packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec/srtp: Handle CSRC fields being presentMartin Storsjö2013-01-212-4/+21
| | | | | | This is untested in practice, but follows the spec. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Check the return value from av_new_packetMartin Storsjö2013-01-211-1/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Move setting the parsing flags to the actual depacketizersMartin Storsjö2013-01-207-12/+58
| | | | | | | This gets rid of almost all the codec specific details from the generic rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Split handling of mpeg12 audio/video to a separate depacketizerMartin Storsjö2013-01-204-37/+70
| | | | | | This also adds checking of mallocs. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Split mpegts parsing to a normal depacketizerMartin Storsjö2013-01-206-55/+131
| | | | | | | This gets rid of a number of special cases from the common rtpdec code. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Reorder payload handler registration alphabeticallyMartin Storsjö2013-01-201-18/+15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mpegts: Share the cleanup code between the demuxer and lavf-internal parser ↵Martin Storsjö2013-01-201-6/+7
| | | | | | | | | | | | | 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>
* rtpdec_mpeg4: Return one AAC AU per AVPacketMartin Storsjö2013-01-201-12/+31
| | | | | | | This makes the returned data valid to stream copy into other containers as well, not only for decoding straight away. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: support ZenoXVID custom tagLuca Barbato2013-01-171-0/+1
| | | | | Looks like this kind of samples are produced by certain Russian equipment.
* idcin: fix memleaks in idcin_read_packet()Justin Ruggles2013-01-161-1/+4
| | | | Fixes fate-id-cin-video failures when running FATE with valgrind.
* rtpdec_mpeg4: Check the remaining amount of data before readingMartin Storsjö2013-01-161-2/+11
| | | | | | This fixes possible buffer overreads. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_mpeg4: Check the return value from mallocMartin Storsjö2013-01-151-1/+5
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Mark a few variables as uninitializedMartin Storsjö2013-01-151-2/+2
| | | | | | | This squelches false positive warnings (with gcc) about them being used uninitalized. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add a fate test for the SRTP functionsMartin Storsjö2013-01-152-0/+130
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* sdp: Include SRTP crypto params if using the srtp protocolMartin Storsjö2013-01-151-1/+14
| | | | | | Also print port numbers for this protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
OpenPOWER on IntegriCloud