summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* lavf: Avoid setting avg_frame_rate if delta_dts is negativeMartin Storsjö2013-09-22
| | | | | | | | | This avoids setting avg_frame_rate to invalid (negative) values. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: Make probe_codec return an error codeAlexandra Khirnova2013-09-16
| | | | | | This allows handling errors from av_realloc properly. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: fix the comparison in an overflow checkAnton Khirnov2013-09-07
| | | | | | CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavf: avoid integer overflow when estimating bitrateAnton Khirnov2013-09-02
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavf: move a variable declaration to the block where it's usedAnton Khirnov2013-09-02
|
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* 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>
* 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>
* avf: move url utility functions in a separate fileLuca Barbato2013-06-16
|
* avf: move ff_write_chained to mux.cLuca Barbato2013-06-16
|
* avf: move riff tags accessors where they belongLuca Barbato2013-06-16
|
* avf: move ff_http_match_no_proxy to networkLuca Barbato2013-06-16
| | | | It is only used by network protocols.
* avf: split off format register and lookup functionLuca Barbato2013-06-16
|
* lavf: preserve side data when parsing packets.Anton Khirnov2013-05-28
|
* Remove commented-out debug #define cruftDiego Biurrun2013-05-16
|
* avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
|
* silly typo fixesDiego Biurrun2013-05-03
|
* lavf: make sure stream probe data gets freed.Anton Khirnov2013-04-04
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lavf: sanity check size in av_get/append_packet().Anton Khirnov2013-03-15
| | | | | | To avoid allocating ridiculous amounts of memory for corrupted files, read the input in chunks limited to filesize or an arbitrary large amount when that is not known (chosen to be 50M).
* lavf: remove disabled FF_API_R_FRAME_RATE cruftAnton Khirnov2013-03-11
|
* lavf: remove disabled FF_API_AV_GETTIME cruftAnton Khirnov2013-03-11
|
* lavf: remove disabled FF_API_READ_PACKET cruftAnton Khirnov2013-03-11
|
* lavf: remove disabled FF_API_CLOSE_INPUT_FILE cruftAnton Khirnov2013-03-11
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-07
| | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Handle the environment variable no_proxy more properlyMartin Storsjö2013-02-27
| | | | | | | | | | | | | | | | | | | | 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>
* lavf: fix arithmetic overflows in avformat_seek_file()Mans Rullgard2012-12-08
| | | | | | | | The values compared here can be more than INT64_MAX apart. Since the difference is always positive, converting to uint64_t before subtracting gives the correct result without overflows. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-04
|
* lavf: add a common function for selecting a pcm codec from parametersJustin Ruggles2012-11-28
|
* lavf: avoid integer overflow in ff_compute_frame_duration()Janne Grunau2012-11-26
| | | | | | | | Scaling the denominator instead of the numerator if it is too large loses precision. Fixes an assert caused by a negative frame duration in the fuzzed sample nasa-8s2.ts_s202310. CC: libav-stable@libav.org
* url: Handle relative urls starting with two slashesDuncan Salerno2012-10-09
| | | | | | This is defined by RFC 3986 section 5.4.1 to be handled this way. Signed-off-by: Martin Storsjö <martin@martin.st>
* url: Handle relative urls being just a new query stringDuncan Salerno2012-10-09
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* url: Don't treat slashes in query parameters as directory separatorsDuncan Salerno2012-10-09
| | | | | | | Strip off query parameters from the original url before applying the new relative path. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* avformat: split muxing functions from util.cLuca Barbato2012-10-01
|
* avformat: const correctness for av_hex_dump / av_hex_dump_logDiego Biurrun2012-10-01
|
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* lavf: use a malloced AVFrame in try_decode_frame().Anton Khirnov2012-09-24
| | | | This allows using avcodec_free_frame() to free it properly.
* lavf: zero data/size of the packet passed to read_packet().Anton Khirnov2012-09-21
|
* lavf probe: prevent codec probe with no data at all seenJanne Grunau2012-09-20
| | | | | | This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is called with a zeroed AVProbeData since no packet made through for specific stream.
* avformat: fix typo in avformat_close_inputLuca Barbato2012-09-15
| | | | The condition should not be &&.
* lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-15
| | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
* lavf: cosmetics, reformat av_write_trailer().Anton Khirnov2012-09-15
|
* avformat: refactor avformat_close_inputLuca Barbato2012-09-14
| | | | Do not crash if the input format is not allocated yet.
* avformat: simplify avformat_close_inputLuca Barbato2012-09-14
| | | | avio_close checks by itself for NULL condition.
* libavformat: add const to AVCodec pointersMans Rullgard2012-08-18
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: Detect discontinuities in timestamps for framerate/analyzeduration ↵Martin Storsjö2012-08-12
| | | | | | | | | calculation If the dts difference is more than 1000 times the average dts difference, restart the analysis. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Initialize the stream info timestamps in avformat_new_streamMartin Storsjö2012-08-12
| | | | | | | | | | | These are normally initialized to AV_NOPTS_VALUE at the start of avformat_find_stream_info, but if a new stream is found while this function is running (e.g. like in mpegts), the newly added AVStreams didn't have these values properly initalized, leading to avformat_find_stream_info terminating too soon (when the first timestamps are far from 0). Signed-off-by: Martin Storsjö <martin@martin.st>