Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-10URLContext: switch to child_class_iterate()Anton Khirnov
2020-03-18remove CHAR_MIN/CHAR_MAX usagePaul B Mahol
It is not needed at all.
2020-01-20avformat/avio: fix ff_rename to respect used protocolMarton Balint
Also simplify it and make it always log the error. This fixes for example the image2 muxer when used with an URL which also contains the protocol: ffmpeg -f lavfi -i testsrc -vframes 10 -atomic_writing 1 file:out%d.png Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-20avformat/avio: move ff_rename implementation from internal.h to avio.cMarton Balint
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-11-29avformat/avio: Use ffurl_closepAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-01lavf/avio: Print https warning also for avio_find_protocol_name().Carl Eugen Hoyos
Helps to fix ticket #8197.
2018-05-06avformat/avio: make the logic simpleJun Zhao
remove the "ret" to make the code simple and generic. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2017-12-28avformat/avio: check input URLContext value NULLSteven Liu
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Karthick Jeyapal <kjeyapal@akamai.com>
2017-10-23lavf/avio: Print the https warning also for missing tls protocol.Carl Eugen Hoyos
2017-10-19libavformat: not treat 0 as EOFDaniel Kucera
transfer_func variable passed to retry_transfer_wrapper are h->prot->url_read and h->prot->url_write functions. These need to return EOF or other error properly. In case of returning >= 0, url_read/url_write is retried until error is returned. Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
2017-07-10avformat/avio: Remove no-op code in url_find_protocol().Wan-Teh Chang
In url_find_protocol(), proto_str is either "file" or a string consisting of only the characters in URL_SCHEME_CHARS, which does not include ','. Therefore the strchr(proto_str, ',') call always returns NULL. Note: The code was added in commit 6161c41817f6e53abb3021d67ca0f19def682718. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-03-15lavf/avio: Be more explicit in logging white/black list matchesAlexander Strasser
The current form of the messages indicating matches in the white or black lists seems to be a bit too much relying on context. Make the messages more explicit. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2017-03-15lavf/avio: Remove unnecessary escaping of ' in string literalsAlexander Strasser
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2017-02-14HTTP: improve performance by reducing forward seeksJoel Cunningham
This commit optimizes HTTP performance by reducing forward seeks, instead favoring a read-ahead and discard on the current connection (referred to as a short seek) for seeks that are within a TCP window's worth of data. This improves performance because with TCP flow control, a window's worth of data will be in the local socket buffer already or in-flight from the sender once congestion control on the sender is fully utilizing the window. Note: this approach doesn't attempt to differentiate from a newly opened connection which may not be fully utilizing the window due to congestion control vs one that is. The receiver can't get at this information, so we assume worst case; that full window is in use (we did advertise it after all) and that data could be in-flight The previous behavior of closing the connection, then opening a new with a new HTTP range value results in a massive amounts of discarded and re-sent data when large TCP windows are used. This has been observed on MacOS/iOS which starts with an initial window of 256KB and grows up to 1MB depending on the bandwidth-product delay. When seeking within a window's worth of data and we close the connection, then open a new one within the same window's worth of data, we discard from the current offset till the end of the window. Then on the new connection the server ends up re-sending the previous data from new offset till the end of old window. Example (assumes full window utilization): TCP window size: 64KB Position: 32KB Forward seek position: 40KB * (Next window) 32KB |--------------| 96KB |---------------| 160KB * 40KB |---------------| 104KB Re-sent amount: 96KB - 40KB = 56KB For a real world test example, I have MP4 file of ~25MB, which ffplay only reads ~16MB and performs 177 seeks. With current ffmpeg, this results in 177 HTTP GETs and ~73MB worth of TCP data communication. With this patch, ffmpeg issues 4 HTTP GETs and 3 seeks for a total of ~22MB of TCP data communication. To support this feature, the short seek logic in avio_seek() has been extended to call a function to get the short seek threshold value. This callback has been plumbed to the URLProtocol structure, which now has infrastructure in HTTP and TCP to get the underlying receiver window size via SO_RCVBUF. If the underlying URL and protocol don't support returning a short seek threshold, the default s->short_seek_threshold is used This feature has been tested on Windows 7 and MacOS/iOS. Windows support is slightly complicated by the fact that when TCP window auto-tuning is enabled, SO_RCVBUF doesn't report the real window size, but it does if SO_RCVBUF was manually set (disabling auto-tuning). So we can only use this optimization on Windows in the later case Signed-off-by: Joel Cunningham <joel.cunningham@me.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-18avformat/avio: Fix null pointer dereference in case of memleakMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-18avformat/avio: fix memory leak in url_find_protocolYong Lei
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-21Merge commit 'fab8156b2f30666adabe227b3d7712fd193873b1'Derek Buitenhuis
* commit 'fab8156b2f30666adabe227b3d7712fd193873b1': avio: Copy URLContext generic options into child URLContexts Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-18Merge commit 'ccea588f831906084b8c8235222920e6984beb72'Derek Buitenhuis
* commit 'ccea588f831906084b8c8235222920e6984beb72': avio: Add an option 'rw_timeout' Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-18Merge commit 'd44f3e4059506a182f59218b1e967d42b01e097c'Derek Buitenhuis
* commit 'd44f3e4059506a182f59218b1e967d42b01e097c': avio: Apply avoptions on the URLContext itself as well Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10lavf/avio: Remove linebreak from https warning.Carl Eugen Hoyos
2016-03-24avio: Copy URLContext generic options into child URLContextsMartin Storsjö
Since all URLContexts have the same AVOptions, such AVOptions will be applied on the outermost context only and removed from the dict, while they probably make sense on all contexts. This makes sure that rw_timeout gets propagated to the innermost URLContext (to make sure it gets passed to the tcp protocol, when opening a http connection for instance). Alternatively, such matching options would be kept in the dict and only removed after the ffurl_connect call. Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24avio: Add an option 'rw_timeout'Andrey Utkin
If set non-zero, this limits duration of the retry_transfer_wrapper() loop, thus affecting ffurl_read*(), ffurl_write(). As soon as one single byte is successfully received/transmitted, the timer restarts. This has further changes by Michael Niedermayer and Martin Storsjö. Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24avio: Apply avoptions on the URLContext itself as wellMartin Storsjö
Currently the list of avoptions for URLContext is empty though, but such options will be added. Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-17avformat/avio: Fix unknown protocol handlingMichael Niedermayer
Fixes regression since bb8cc89b2986df6f60831b67cd250da312cce1d0 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04avformat: Add a protocol blacklisting APIDerek Buitenhuis
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-29Merge commit '832a202c47a246ed15e3edc6b05dfcfa7d82c4b2'Derek Buitenhuis
* commit '832a202c47a246ed15e3edc6b05dfcfa7d82c4b2': protocols: make the list of protocols static Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-29Merge commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56'Derek Buitenhuis
* commit '7d61dc95d741ca134d59b1f34c4e10c4c4e36f56': lavf: move urlcontext_child_class_next() to protocols.c Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-29Merge commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6'Derek Buitenhuis
* commit '0fa00d05911aa8043ecad8dead4a73cab7faadf6': lavf: move avio_enum_protocols() to protocols.c Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-29Merge commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d'Derek Buitenhuis
This commit also disables the async fate test, because it used internal APIs in a non-kosher way, which no longer exists. * commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d': lavf: reorganize URLProtocols Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-22urlprotocol: receive a list of protocols from the callerAnton Khirnov
This way, the decisions about which protocols are available for use in any given situations can be delegated to the caller.
2016-02-22protocols: make the list of protocols staticAnton Khirnov
Disallow other code to touch it directly, now it's only accessible through a blacklisting/whitelisting function.
2016-02-22lavf: move urlcontext_child_class_next() to protocols.cAnton Khirnov
It needs to access the list of protocols directly, so it more properly belongs there.
2016-02-22lavf: move avio_enum_protocols() to protocols.cAnton Khirnov
It's a more appropriate place for it.
2016-02-22lavf: reorganize URLProtocolsAnton Khirnov
Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits.
2016-02-02avformat: add protocol_whitelistMichael Niedermayer
Note to maintainers: update tools Note to maintainers: set a default whitelist for your protocol If that makes no sense then consider to set "none" and thus require the user to specify a white-list for sub-protocols to be opened Note, testing and checking for missing changes is needed Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-29avformat/avio: free url/avio optionsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-20avformat/avio: Limit url option parsing to the documented casesMichael Niedermayer
This feature is not know much or used much AFAIK, and it might be helpfull in exploits. No specific case is known where it can be used in an exploit though subsequent commits depend on this commit though Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-01lavf/avio: add ffurl_accept and ffurl_handshakeStephan Holljes
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
2015-06-29avformat/avio: Move avio_delete() avio_move() to avpriv_ namespaceMichael Niedermayer
This was suggested in the discussion about these functions With this change the functions are available internally but are not part of the public API Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-24lavf: set is_connected flag so url can be properly closedMariusz Szczepańczyk
Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-22lavf/avio: Extend API with avio_move() and avio_delete()Mariusz Szczepańczyk
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18avformat: clarify what package needs to be compiled with SSL supportwm4
Try to reduce user confusion. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29lavf/tls: Support Secure TransportRodger Combs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-27lavf: add directory listing APILukasz Marek
API allows protocol implementations to provide API that allows to list directory content. API is similar to POSIX opendir/readdir/closedir. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12Merge commit 'b97f427fb56bdbf7de8e2d4b72d01114aa6eceda'Michael Niedermayer
* commit 'b97f427fb56bdbf7de8e2d4b72d01114aa6eceda': lavf: Explicitly convert types at function pointer assignment Conflicts: libavformat/avio.c libavformat/aviobuf.c libavformat/swfenc.c See: a76a2ffe9d7773d59bb1bc228a6660e23672c490 and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12lavf: Explicitly convert types at function pointer assignmentDiego Biurrun
This fixes a number of "assignment from incompatible pointer type" warnings.
2014-10-20avio: fix sizeof argumentMichael Niedermayer
CC: libav-stable@libav.org Bug-Id: CID 732284
2014-08-15Merge commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867'Michael Niedermayer
* commit '4b1f5e5090abed6c618c8ba380cd7d28d140f867': cosmetics: Write NULL pointer inequality checks more compactly Conflicts: libavcodec/dvdsubdec.c libavcodec/h263dec.c libavcodec/libxvid.c libavcodec/rv10.c libavcodec/utils.c libavformat/format.c libavformat/matroskadec.c libavformat/segment.c libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-12Fix warning if https protocol was requested but isn't available.Carl Eugen Hoyos