summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* 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>
* rtpdec: Calculate and report packet reception jitterMartin Storsjö2013-01-12
| | | | | | | | | This brings back some code that was added originally in 4a6cc061 but never was used, and was removed as unused in 4cc843fa. The code is updated to actually work and is tested to return sane values. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Fix the calculation of expected number of packetsMartin Storsjö2013-01-12
| | | | | | | | | The base_seq variable is set to first_seq - 1 (in rtp_init_sequence), so no + 1 is needed here. This avoids reporting 1 lost packet from the start. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove a useless todo commentMartin Storsjö2013-01-12
| | | | | | | | | The question can be answered: No, we do not know the initial sequence number from the SDP. In certain cases, it can be known from the RTP-Info response header in RTSP though. (In that case, we use it as timestamp origin, but not for rtp receiver statistics.) Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Remove an outdated commentMartin Storsjö2013-01-12
| | | | | | | | It is unclear what the bug exactly was and if it ever was fixed, and we don't even support decoding via faad any longer. The comment has been present since d0deedcb in 2006. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Remove references to weirdly named variables in other filesMartin Storsjö2013-01-12
| | | | | | | | One of them is renamed now, but mentioning it by name serves no purpose here. The other table mentioned ceased to exist under that name in 4934884a1 in 2006. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Rename a static variable to normal naming conventionsMartin Storsjö2013-01-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Cosmetic cleanupMartin Storsjö2013-01-12
| | | | | | | Remove leftover debug comments, fix brace placement and add whitespace, remove unnecessary and weirdly placed braces. Signed-off-by: Martin Storsjö <martin@martin.st>
* matroska: Fix use after freeDale Curtis2013-01-11
| | | | | Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtpdec_vp8: Don't trim too much data from broken framesMartin Storsjö2013-01-10
| | | | | | | | | | | | | Previously, for broken frames, we only returned the first partition of the frame (we would append all the received packets to the packet buffer, then set pkt->size to the size of the first partition, since the rest of the frame could have lost data inbetween) - now instead return the full buffered data we have, but don't append anything more to the buffer after the lost packet discontinuity. Decoding the truncated packet should hopefully get better quality than trimming out everything after the first partition. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_vp8: Simplify code by using an existing helper functionMartin Storsjö2013-01-10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Add a terminating null byte at the end of the SDES/CNAMEMartin Storsjö2013-01-10
| | | | | | | | | | | | | | | | This is required by RFC 3550 (section 6.5): The list of items in each chunk MUST be terminated by one or more null octets, the first of which is interpreted as an item type of zero to denote the end of the list. This was implicitly added as padding before, unless the host name length matched up so no padding was added. This makes wireshark parse the packets properly if other RTCP items are appended to the same packet. Signed-off-by: Martin Storsjö <martin@martin.st>
* yuv4mpeg: do not use deprecated functionsLuca Barbato2013-01-09
| | | | Use the libavutil replacement.
* oggdec: fix faulty cleanup prototypeLuca Barbato2013-01-09
|