aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * lavf: Handle the environment variable no_proxy more properlyMartin Storsjö2013-02-271-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-1/+1
| | | | | | | | | | | | | | | | 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>
* | Revert "lavf/utils: add support for special characters encoding in URL"Michael Niedermayer2013-02-281-47/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4a8fc1d83b1b55e1ac533644168018ebeec0c732. The commit caused null pointer derefernces when using udp:// after i fixed that it caused ffmpeg to get stuck and remapped arguments like ?ttl=255 -> ?ttl%3d255 I dont want to leave this broken thus temporary revert so we all have some time to look at this without half the network protocols being broken in the meantime
* | lavf/utils: add support for special characters encoding in URLSenthilnathan M2013-02-281-0/+47
| | | | | | | | | | | | | | In particular, fix trac ticket #2031. Signed-off-by: Senthilnathan M <senthilnathan.maadasamy@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
* | avformat: Allocate duration_error separatelyMichael Niedermayer2013-02-231-2/+10
| | | | | | | | | | | | | | This significantly reduces the memory needed per AVStream when the array is not needed. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ff_gen_search: Fix finding the maximum timestamp in a really small fileMichael Niedermayer2013-02-181-2/+2
| | | | | | | | | | | | | | Fixes Assertion failure Found-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ff_read_timestamp: check stream_index before using it as array indexMichael Niedermayer2013-02-181-1/+4
| | | | | | | | | | | | | | Fixes out of array read Found-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: dont try to find fps for attached picturesMichael Niedermayer2013-02-151-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: add seek2any to allow forcing seeking to non keyframes via AVOptionsMichael Niedermayer2013-02-071-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: provide feedback in case of invalid probe sizeStefano Sabatini2013-01-191-0/+2
| | | | | | | | | | Log message in case the max_probe_size value in av_probe_input_buffer() is smaller than the minimum accepted value.
* | Add a new function av_codec_get_tag2().Carl Eugen Hoyos2013-01-171-2/+17
| | | | | | | | | | | | av_codec_get_tag() may return 0 both in case a codec_tag was found and if no codec_tag was found. The new function does not have this ambiguity.
* | lavf/utils: clarify/extend messages in avformat_find_stream_info()Stefano Sabatini2013-01-131-2/+2
| | | | | | | | | | In particular, specify the unit of the shown values in case the max probe size/duration is reached.
* | lavf: use avpriv_find_pix_fmt instead of ff_Michael Niedermayer2013-01-121-1/+1
| | | | | | | | | | Found-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: more complete dts checksMichael Niedermayer2013-01-081-1/+2
| | | | | | | | | | | | | | Fixes division by zero Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ff_get_audio_frame_size: try to fix wma in wavMichael Niedermayer2013-01-061-0/+7
| | | | | | | | | | | | Fixes Ticket1905, Ticket2114 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix AVCI50 SPS to specify a SAR of 4:3 instead of 3:4.Carl Eugen Hoyos2013-01-051-2/+2
| |
* | Support more AVC-Intra filesReimar Döffinger2013-01-031-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | Followup to http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/151321 patch by Reimar and Thomas Mundt fixes some AVC-Intra files from different tickets. It does not fix http://samples.ffmpeg.org/ffmpeg- bugs/trac/ticket524/AVCI50.mov Authors of this commit are: Reimar and Thomas Mundt Patch and commit message mostly taken from ffmpeg-devel, mail by Carl Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: add return to silence compiler warningMichael Niedermayer2013-01-031-0/+1
| | | | | | | | | | | | The added statement is not reachable Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Replace references to "que" with the appropriate word.Clément Bœsch2013-01-031-2/+2
| | | | | | | | | | | | "que" sounds like a slang word to me. This commit renames a few variables, fix the comments and the logging messages (sometimes along with small other typo fixes).
* | avformat_seek_file: Dont attempt to rescale INT64_MIN/MAXMichael Niedermayer2013-01-031-2/+2
| | | | | | | | | | | | | | This fixes a integer overflow in fate Reviewed-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: move stream==-1 handling from ff_subtitles_queue_seek() to ↵Michael Niedermayer2013-01-021-0/+12
| | | | | | | | | | | | avformat_seek_file() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Fix codec id forcing with probed codecsMichael Niedermayer2013-01-021-0/+1
| | | | | | | | | | | | Fixes Ticket2088 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: move force_codec_ids() upMichael Niedermayer2013-01-021-15/+15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Remove "Adjusting PTS forward" codeMichael Niedermayer2012-12-211-14/+0
| | | | | | | | | | | | | | it causes problems (incorrectly detect TS discontinuities) with a brokan TS file (test-audio-broken.ts) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | utils: fix duration calculation for strange_duration_example.tsMichael Niedermayer2012-12-191-2/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | wrap_timestamp: remove unneeded checkMichael Niedermayer2012-12-161-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: fix integer overflowsMichael Niedermayer2012-12-161-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Provide a monotonic timestamp to the outside worldHarald Axmann2012-12-151-10/+113
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: remove unneeded pb checkMichael Niedermayer2012-12-111-1/+1
| | | | | | | | | | Fixes CID747727 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: fix memleakMichael Niedermayer2012-12-111-0/+1
| | | | | | | | | | Fixes CID747738 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | http/utils: rename "demuxer" to mime_typeMichael Niedermayer2012-12-101-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | http/utils: move mime -> demuxer maping from http to utilsMichael Niedermayer2012-12-091-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | probe: belive protocol content type if set and avoid lengthly probing.Michael Niedermayer2012-12-091-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967'Michael Niedermayer2012-12-051-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967': Remove pointless #undefs of previously forbidden functions. fate: Add dependencies for bmp, cdxl, dfa, mp3 Conflicts: doc/examples/muxing.c libavfilter/filtfmts.c libavutil/des.c libavutil/eval.c libavutil/log.c libavutil/parseutils.c tests/fate/mp3.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-041-2/+0
| |
* | lavf: compute probe buffer size more reliably.Nicolas George2012-12-041-3/+2
| | | | | | | | | | | | | | | | The previous code computes the offset by reversing the growth of the allocated buffer size: it is complex and did lead to inconsistencies when the size limit is reached. Fix trac ticket #1991.
* | lavf: the core rfps code needs 2 durations to estimate rfpsMichael Niedermayer2012-12-041-1/+1
| | | | | | | | | | | | | | This fixes a regression where this count became 1 with HPM-GC\ EXPORT\ FCP-1A-AVCI100-1080i25-001.mxf Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5c7bf2dddee5bdfa247ff0d57cb8a37d19077f66'Michael Niedermayer2012-11-291-0/+31
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '5c7bf2dddee5bdfa247ff0d57cb8a37d19077f66': lavf: move nuv fourcc audio tags from riff to nuv lavf: add a common function for selecting a pcm codec from parameters Conflicts: libavformat/internal.h libavformat/mov.c libavformat/riff.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add a common function for selecting a pcm codec from parametersJustin Ruggles2012-11-281-0/+30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-261-1/+4
|\| | | | | | | | | | | | | * qatar/master: lavf: avoid integer overflow in ff_compute_frame_duration() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: avoid integer overflow in ff_compute_frame_duration()Janne Grunau2012-11-261-1/+4
| | | | | | | | | | | | | | | | 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
* | replace av_log(0, by av_log(NULL,Michael Niedermayer2012-11-231-2/+2
| | | | | | | | | | | | The first parameter is a pointer and NULL is more correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add -skip_initial_bytes option.Carl Eugen Hoyos2012-11-201-0/+1
| | | | | | | | Fixes ticket #1909.
* | Allow use of @ character in username and passwords embedded in URLsGavin Kinsey2012-11-191-4/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: let av_find_best_stream use bitrate info if availableMarton Balint2012-11-181-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I guess the user expects to see the stream with the highest bitrate, not with the most frames, this is especially useful for multi bitrate streams. This patch changes av_find_best_stream to select the stream based on a number of conditions, the first condition has the highest priority, the last condition has the lowest: 1) Select the stream with the highest FFMIN(5, codec_info_nb_frames) value 2) Select the stream with the highest bitrate 3) Select the stream with the highest codec_info_nb_frames 4) Select the first stream Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | av_probe_input_format3: support NULL as buffer. Fixes null ptr derefMichael Niedermayer2012-11-131-0/+4
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: Dont compare absolute to relative timestamps in duration gcdMichael Niedermayer2012-11-091-1/+1
| | | | | | | | | | | | | | This prevents a division by 0 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | utils: fix integer overflow with DURATION_MAX_READ_SIZEMichael Niedermayer2012-11-061-1/+1
| | | | | | | | | | Fixes CID703746 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf: fix integer overflow in rfps calculationMichael Niedermayer2012-11-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | utils: fix rounding of micro secondsMichael Niedermayer2012-10-311-2/+3
| | | | | | | | | | Found-by: Johan Wessfeldt <johan.wessfeldt@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>