summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* 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>
* rtsp: Include an User-Agent header field in all requestsMartin Storsjö2013-07-14
| | | | | | | | Some rtsp servers like the IP Cam IcyBox IB-CAM2002 need it. Based on a patch by Carl Eugen Hoyos. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Rename the timestamp parameter to dts in write_hint_packetsMartin Storsjö2013-07-08
| | | | | | This matches its actual intended use better. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Make sure the RTP hint tracks have nondecreasing DTSMartin Storsjö2013-07-08
| | | | | | | | | The RTP timestamps can be decreasing for codecs with B-frames. For these cases, make sure the timestamps in the MP4 file track itself are nondecreasing, and add an offset to the RTP packet hint instead to produce the intended RTP timestamp. Signed-off-by: Martin Storsjö <martin@martin.st>
* westwood_vqa: do not free extradata on error in read_headerLuca Barbato2013-07-07
| | | | | | | | The extradata is already freed by avformat_open_input on failure. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* movenc: K&R formatting cosmeticsMartin Storsjö2013-07-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Makefile: Remove stray tabsMichael Niedermayer2013-07-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* yuv4mpeg: Correctly round chroma up for odd luma sizesRonald S. Bultje2013-07-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rmdec: Use the AVIOContext given as parameter in rm_read_metadata()Michael Niedermayer2013-07-07
| | | | | | | | | | | | | | | This fixes crashes when playing back certain RealRTSP streams. When invoked from the RTP depacketizer, the full realmedia demuxer isn't invoked, but only certain functions from it, where a separate AVIOContext is passed in as parameter (for the buffer containing the data to parse). The functions called from within those entry points should only be using that parameter, not s->pb. In the depacketizer case, s is the RTSP context, where ->pb is null. Cc: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Handle AVERROR_EOF in the same way as the return value 0Michael Niedermayer2013-07-07
| | | | | | | | | This makes sure the ffurl_read_complete function actually returns the number of bytes read, as the documentation of the function says, even if the underlying protocol uses AVERROR_EOF instead of 0. Signed-off-by: Martin Storsjö <martin@martin.st>
* wtv: Mark attachment with a negative stream idLuca Barbato2013-07-07
| | | | | | | | | A sid 0 would be mismatched to the attachment. Prevent NULL pointer dereference. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* tests: Only run noproxy test if networking is enabledDiego Biurrun2013-07-06
|
* oggdec: do not fall back on binary search in the generic code.Anton Khirnov2013-07-02
| | | | | Binary search is already attempted in the format-specific seek function, so the fallback is only reached if binary search failed already.
* lavf: don't abort if both encoder and muxer aspect ratios are not setRafaël Carré2013-06-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* matroskaenc: restore compatibility with non referenced AVPacketRafaël Carré2013-06-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ogg: relax demuxer conformance checksLuca Barbato2013-06-22
| | | | | Some samples in the wild are missing headers that are expected by the specification but in practice do not affect decoding.
* smacker: check frame size validityKostya Shishkov2013-06-16
| | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>