summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* asf: K&R formatting cosmeticsDiego Biurrun2013-02-06
|
* Use proper "" quotes for local header #includesDiego Biurrun2013-02-01
|
* bink demuxer: set framerate.Anton Khirnov2013-02-01
|
* bink demuxer: check malloc return valueAnton Khirnov2013-02-01
|
* avisynth: Change demuxer name to avoid conflicts with AVSDiego Biurrun2013-01-31
|
* movenc: Simplify code by using avio_wb24Martin Storsjö2013-01-30
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mvi: set framerateAnton Khirnov2013-01-29
| | | | This container does not store timestamps and thus supports CFR only.
* rtpenc_chain: Use the original AVFormatContext for getting payload typeMartin Storsjö2013-01-24
| | | | | | | | | | | | | | | | | 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-24
| | | | | | | | 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-23
| | | | | | | 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-23
| | | | | | | | | | | | 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-23
| | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | 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-22
| | | | | | | | 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-21
| | | | | | | | 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-21
| | | | | | 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-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: cosmetics: Use fewer lines for the test vectorsMartin Storsjö2013-01-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Don't require more input data than what actually is neededMartin Storsjö2013-01-21
| | | | | | | | | | 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-21
| | | | | | | 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-21
| | | | | | | | 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-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-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Move setting the parsing flags to the actual depacketizersMartin Storsjö2013-01-20
| | | | | | | 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-20
| | | | | | 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-20
| | | | | | | 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-20
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* rtpdec_mpeg4: Return one AAC AU per AVPacketMartin Storsjö2013-01-20
| | | | | | | 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-17
| | | | | Looks like this kind of samples are produced by certain Russian equipment.
* idcin: fix memleaks in idcin_read_packet()Justin Ruggles2013-01-16
| | | | Fixes fate-id-cin-video failures when running FATE with valgrind.
* rtpdec_mpeg4: Check the remaining amount of data before readingMartin Storsjö2013-01-16
| | | | | | This fixes possible buffer overreads. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_mpeg4: Check the return value from mallocMartin Storsjö2013-01-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* srtp: Mark a few variables as uninitializedMartin Storsjö2013-01-15
| | | | | | | 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-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* sdp: Include SRTP crypto params if using the srtp protocolMartin Storsjö2013-01-15
| | | | | | Also print port numbers for this protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add a protocol for SRTP encryption/decryptionMartin Storsjö2013-01-15
| | | | | | | | This is mostly useful for encryption together with the RTP muxer, but could also be set up as IO towards the peer with the SDP demuxer with custom IO. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Support decryption of SRTP signalled via RFC 4568 (SDES)Martin Storsjö2013-01-15
| | | | | | | | | | | | | | This only takes care of decrypting incoming packets; the outgoing RTCP packets are not encrypted. This is enough for some use cases, and signalling crypto keys for use with outgoing RTCP packets doesn't fit as simply into the API. If the SDP demuxer is hooked up with custom IO, the return packets can be encrypted e.g. via the SRTP protocol. If the SRTP keys aren't available within the SDP, the decryption can be handled externally as well (when using custom IO). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add functions for SRTP decryption/encryptionMartin Storsjö2013-01-15
| | | | | | | | | | This supports the AES_CM_128_HMAC_SHA1_80 and AES_CM_128_HMAC_SHA1_32 cipher suites (from RFC 4568) at the moment. The main missing features are replay protection (which can be added later without changing the internal API), and the F8 and null ciphers. Signed-off-by: Martin Storsjö <martin@martin.st>
* nutdec: Always return a value from nut_read_timestamp()Diego Biurrun2013-01-15
| | | | | | | | | The function is a callback that is called by ff_gen_search with a constant stream index. Avoid a false positive on older gcc version. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* oggparsetheora: fix comment header parsingGiorgio Vazzana2013-01-14
| | | | | | Pass the correct header size to ff_vorbis_comment() Signed-off-by: Martin Storsjö <martin@martin.st>
* nut: support vp9 tagLuca Barbato2013-01-14
|
* mkv: support vp9 tagTom Finegan2013-01-14
|
* rtpdec: Make variables that should wrap unsignedMartin Storsjö2013-01-14
| | | | | | | This makes the behaviour defined when they wrap around. The value assigned to expected_prior was a uint32_t already. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Handle more received packets than expected when sending RRMartin Storsjö2013-01-14
| | | | | | | | | | Without this, we'd signal a huge loss rate (due to unsigned wraparound) if we had received one packet more than expected (that is, one seq number sent twice). The code has a check for lost_interval <= 0, but that doesn't do what was intended as long as the variable is unsigned. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Simplify insertion into the linked list queueMartin Storsjö2013-01-14
| | | | | | | By using a pointer-to-pointer, we avoid having to keep track of the previous packet separately. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove a woefully misplaced commentMartin Storsjö2013-01-14
| | | | | | | | The code below the comment does not at all relate to statistics, and even if moved to the right place, the comment adds little value. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Fix assignments in if()Michael Niedermayer2013-01-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Fix assignments in if()Michael Niedermayer2013-01-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Send a valid "delay since SR" value in the RTCP RR packetsMartin Storsjö2013-01-12
| | | | | | | | | | | Previously, we always signalled a zero time since the last RTCP SR, which is dubious. The code also suggested that this would be the difference in RTP NTP time units (32.32 fixed point), while it actually is in in 1/65536 second units. (RFC 3550 section 6.4.1) Signed-off-by: Martin Storsjö <martin@martin.st>