summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* Give less generic names to global library option arraysDiego Biurrun2013-08-02
|
* rtmp: Add seek supportGavriloaie Eugen-Andrei2013-08-02
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flvdec: Eliminate completely silly gotoDiego Biurrun2013-08-01
|
* flvdec: K&R formatting cosmeticsDiego Biurrun2013-08-01
|
* flvdec: Fix = vs. == typo in sample rate checkDiego Biurrun2013-08-01
|
* rtsp: Simplify code for forming the remote peer urlMartin Storsjö2013-08-01
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Allow specifying a separate rtcp port in ff_rtp_set_remote_urlMartin Storsjö2013-08-01
| | | | | | | | | | A separate rtcp port can already be set when opening the rtp protocol normally, but when doing port setup as in RTSP (where we first need to open the local ports and pass them to the peer, and only then receive the remote peer port numbers), we didn't check the same url parameter as in the normal open routine. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Check the size before reading buf[1]Martin Storsjö2013-08-01
| | | | | | | | I doubt that anyone ever would try to send a 1 byte packet via the RTP protocol, but check just in case - it shouldn't crash at least. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Move rtpproto specific function declarations to a separate headerMartin Storsjö2013-07-31
| | | | | | | Mixing these with the rtp depacketizer functions in rtpdec.h is no good. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Simplify the rtp_read function by looping over the fdsMartin Storsjö2013-07-31
| | | | | | | This avoids having duplicate code where only the fd parameter differs. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Remove a misplaced commentMartin Storsjö2013-07-31
| | | | | | | The fdset is a pollfd array nowadays, and it is already populated at this point. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Support nonblocking readsMartin Storsjö2013-07-31
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Simplify code by introducing a macro for rescaling NTP timestampsMartin Storsjö2013-07-31
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Call avformat_find_stream_info() on the chained demuxersMichael Niedermayer2013-07-30
| | | | | | | | | This allows the chained demuxer (or more precisely, the lavf utility code) to better fill in timestamps on packets from these, especially for cases where one stream is a raw ADTS stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Support RFC4570 (source specific multicast) more properly.Ed Torbett2013-07-29
| | | | | | | Add support for domain names, for multiple source addresses, for exclusions, and for session level specification of addresses. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Support more than one SSM include address, support excludesEd Torbett2013-07-29
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* udp: Keep track of include and exclude sources separatelyEd Torbett2013-07-29
| | | | | | | This allows us to explicitly fail if the caller tried to set both inclusions and exclusions at the same time. Signed-off-by: Martin Storsjö <martin@martin.st>
* udp: Allow specifying multicast include/blocks as host names as wellEd Torbett2013-07-29
| | | | | | | | Previously this only allowed literal IP addresses. When these are conveyed in a SDP file as in RFC4570, host names are allowed as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* avisynth: Fix a "AVISynth" vs. "AviSynth" struct name typoDiego Biurrun2013-07-29
| | | | Also fix some similar typos in comments and documentation.
* hls: Free packets when skipping packets when seekingMartin Storsjö2013-07-29
| | | | | | This fixes memory leaks present since 2b3d041cdc. Signed-off-by: Martin Storsjö <martin@martin.st>
* hlsproto: Store all durations in AV_TIME_BASEMartin Storsjö2013-07-29
| | | | | | | Also parse segment durations as floating point, which is allowed since HLS version 3. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Store all durations in AV_TIME_BASEMartin Storsjö2013-07-29
| | | | | | | | | Also parse segment durations as floating point, which is allowed since HLS version 3. This is based on a patch by Zhang Rui. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Store first_timestamp in units of AV_TIME_BASEMartin Storsjö2013-07-29
| | | | | | | | | | | | | | | | | | | | | When first_timestamp was stored as-is, its actual time base wasn't known later in the seek function. Additionally, the logic (from 795d9594cfa) for scaling it based on stream_index is flawed - stream_index in the seek function only specifies which stream the seek timestamp refers to, but obviously doesn't say anything about which stream first_timestamp belongs to. In the cases where stream_index was >= 0 and all streams had the same time base, this didn't matter in practice. Seeking taking first_timestamp into account is problematic when one variant is mpegts (with real timestamps) and one variant is raw ADTS (with timestamps only being accumulated packet duration), where the variants start at totally different timestamps. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Create an AVProgram for each variantLYF2013-07-29
| | | | | | | | | Without the information, an application may choose audio from one variant and video from another variant, which leads to fetching two variants from the network. This enables av_find_best_stream() to find matching audio and video streams, so that only one variant is fetched. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Respect the different stream time bases when comparing dtsMichael Niedermayer2013-07-29
| | | | | | | | | | | | | | | | | | Also adjust the streams timestamps according to their start timestamp when comparing. This helps getting correctly interleaved packets if one stream lacks timestamps (such as a plain ADTS stream when the other variants are full mpegts) when the others have timestamps that don't start from zero. This probably doesn't work properly if such a stream is temporarily disabled (via the discard flags) and then reenabled, and such streams are hard to correctly sync against the other streams as well - but this works better than before at least. The segment number restriction makes sure all variants advance roughly at the same pace as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Set stream offset before opening a chained demuxerMartin Storsjö2013-07-29
| | | | | | | This makes sure we don't accidentally check discard flags for the wrong stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Don't check discard flags until the parent demuxer's streams actually existMichael Niedermayer2013-07-29
| | | | | | | | If passing the end of one segment while initializing the chained demuxer, the parent demuxer's streams aren't set up yet, so we can't recheck the discard flags. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Copy the time base from the chained demuxerMichael Niedermayer2013-07-29
| | | | | | | When a variant stream isn't mpegts but e.g. raw adts, the default time base (90k) isn't correct. Signed-off-by: Martin Storsjö <martin@martin.st>
* hls: Return all packets from a previous variant before moving on to the next oneMartin Storsjö2013-07-29
| | | | | | | | | | This serves as a safeguard; normally we want to use the dts comparison to interleave packets from all active variants. If that dts comparison for some reason doesn't work as intended, make sure that all packets in all variants for a certain sequence number have been returned before moving on to the next one. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Don't interpret just slightly broken timestamps as wraparoundMichael Niedermayer2013-07-29
| | | | | | | This avoids breaking some slightly incorrect (dts > pts) timestamps in sample HLS streams from Apple. Signed-off-by: Martin Storsjö <martin@martin.st>
* oma: correctly mark and decrypt partial packetsLuca Barbato2013-07-28
| | | | | | | | Incomplete crypted files would lead to a read after buffer boundary otherwise. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* oma: check geob tag boundaryLuca Barbato2013-07-28
| | | | | | | Prevent read after buffer boundary on corrupted tag. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* oma: refactor seek functionLuca Barbato2013-07-28
| | | | Properly propagate seek errors from avio and the generic pcm seek.
* http: Support reading gzip/deflate compressed dataZhang Rui2013-07-28
| | | | | | | | | | | | | | | | Derived from VLC's http module. Original authors: Antoine Cellerier <dionoea@videolan.org> Sébastien Escudier <sebastien-devel@celeos.eu> Rémi Duraffort <ivoire@videolan.org> Rémi Denis-Courmont <remi@remlab.net> Francois Cartegnie <fcvlcdev@free.fr> Normally, http servers shouldn't send this to us since we don't advertise it with an Accept-Encoding header, but some servers still do it anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* Remove unreachable returnsDiego Biurrun2013-07-27
|
* avidec: Let the inner dv demuxer take care of discardingLuca Barbato2013-07-27
| | | | CC: libav-stable@libav.org
* avidec: K&R formatting cosmeticsLuca Barbato2013-07-27
| | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* wtv: Drop some casts that now are unnecessaryMartin Storsjö2013-07-26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* wtv: Make WTV_SECTOR_BITS a 64 bit constantMartin Storsjö2013-07-26
| | | | | | | | This makes sure that values that are left-shifted by this constant end up casted to 64 bit before shifting, avoiding overflow if the value ends up larger than 2 GB. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Don't set the seekable flag if no seek function is providedHendrik Schreiber2013-07-26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpenc: Fix some odd commentsMartin Storsjö2013-07-26
| | | | | | | Some weird comments stem from the fact that the rtpdec and rtpenc code was shared earlier. Signed-off-by: Martin Storsjö <martin@martin.st>
* miscellaneous typo fixesDiego Biurrun2013-07-25
|
* cosmetics: Add '0' to float constants ending in '.'.Diego Biurrun2013-07-25
|
* rtsp: Support multicast source filters (RFC 4570)Ed Torbett2013-07-19
| | | | | | | | | | This supports inclusion of one single IP address for now, at the media level. Specifying the filter at the session level (instead of at the media level), multiple source addresses, exclusion, or using FQDNs instead of plain IP addresses is not supported (yet at least). Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Check the source IP if one single source has been specifiedMartin Storsjö2013-07-19
| | | | | | | | | | | | | | If another peer is sending unicast packets to the same port that we are listening on, those packets can end up being received despite using source specific multicast. For those cases, manually check the source address of received packets against the intended source address. This only handles the case when the source list is one single IP address for now, which probably is the most common case. Based on a patch by Ed Torbett. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpproto: Support IGMPv3 source specific multicast inclusionEd Torbett2013-07-19
| | | | | | | | | Blocking/exclusion is not supported yet. The rtp protocol parameter takes the same form as the existing sources parameter for the udp protocol. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Make sure avg_frame_rate can be calculated without integer overflowMartin Storsjö2013-07-15
| | | | | | | | | If either of the deltas is too large for the multiplications to succeed, don't use this for setting the avg frame rate. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Do not allow updating the time scale after it has been setMartin Storsjö2013-07-15
| | | | | | | | | | | | The time scale is set in mdhd, and later validated in the enclosing trak atom once all of its children have been parsed. A loose mdhd atom outside of a trak atom could update the time scale of the last stream without any validation. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Seek back if overreading an individual atomMartin Storsjö2013-07-15
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>