summaryrefslogtreecommitdiff
path: root/libavformat/ftp.c
Commit message (Collapse)AuthorAge
* avformat/ftp: Solve a crash bug when network occur a exceptiontiejun.peng@foxmail.com2017-04-05
| | | | | | | | | | This fixes a proble where ffmpeg would cause crash to do a seek when the network disconnect. The log like this: 01-01 10:53:03.441 6580 6580 F DEBUG : backtrace: 01-01 10:53:03.441 6580 6580 F DEBUG : #00 pc 0002942e /system/lib/libavformat.so (ffurl_write+9) Signed-off-by: tiejun.peng <tiejun.peng@foxmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'fab8156b2f30666adabe227b3d7712fd193873b1'Derek Buitenhuis2016-04-21
| | | | | | | * commit 'fab8156b2f30666adabe227b3d7712fd193873b1': avio: Copy URLContext generic options into child URLContexts Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/ftp: Support response code 125 for STOR and RETR commandsRaymond Hilseth2016-03-07
| | | | | | | | | This fixes a problem where ffmpeg would hang if there is already an open data connection, and the server sends a 125 response code in reply to a STOR or RETR command. Signed-off-by: Raymond Hilseth <rhi@vizrt.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-04
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit '2758cdedfb7ac61f8b5e4861f99218b6fd43491d'Derek Buitenhuis2016-02-29
| | | | | | | | | | | 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>
* Update demuxers and protocols for protocol whitelist supportMichael Niedermayer2016-02-02
| | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
|
* avformat/ftp: use correct enum typeGanesh Ajjanagadde2015-08-20
| | | | | | | | Fixes -Wenum-conversion from http://fate.ffmpeg.org/report.cgi?time=20150820031140&slot=arm64-darwin-clang-apple-5.1 Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/ftp: implement move and delete callbacksMariusz Szczepańczyk2015-08-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace av_dlog with ff_dlog.Ronald S. Bultje2015-08-18
| | | | | ff_dlog checks compilability, and is non-public. av_dlog is deprecated and no longer exists if FF_API_DLOG=0.
* lavf/ftp: implement NLST methodMariusz Szczepańczyk2015-08-14
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ftp: Use av_freep() for dir_bufferMichael Niedermayer2015-08-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/ftp: properly read an empty pathMariusz Szczepańczyk2015-08-10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/ftp: implement directory listing callbacksLukasz Marek2015-08-10
| | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/ftp: remove fixed length buffers from contextLukasz Marek2015-04-03
| | | | | | It saves some memory. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavf/ftp: parse user and password onceLukasz Marek2015-04-03
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* libavformat/ftp: Do not leak memory in routine ftp_featuresAlexander Strasser2014-08-26
| | | | | | | | | | | | | Setting the pointer to NULL inside both ftp_send_command and ftp_features is redundant. Generally always setting to NULL in ftp_send_command seems safer, but throughout the file that parameter was always passed initialized. So I do it here too for consistency. Should fix CID1231988 (RESOURCE_LEAK) OKed-by: Lukasz Marek <lukasz.m.luki2@gmail.com> Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
* Use new av_dict_set_int helper function.Reimar Döffinger2014-08-16
| | | | | | | Get rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* lavf/ftp: always treat all response codes >= 500 as errorLukasz Marek2014-07-04
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavf/ftp: explicitly enable UTF-8Lukasz Marek2014-07-04
| | | | | | | | Most FTP servers enable UTF-8 by default, but it is not required by the standard. Enabling it manually makes ffmpeg implementation more consistent when server doesn't enable it by default. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavf/ftp: make response parsing more RFC compliantLukasz Marek2014-07-04
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavf/ftp: favour EPSV over PASV commandLukasz Marek2014-05-20
| | | | | | EPSV is newer version of PASV and allows to use IPv6. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* lavf/ftp: fix seek to nagative positionLukasz Marek2014-02-28
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* lavf/ftp: remove double spaceLukasz Marek2014-01-22
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* avformat/ftp: add log regarding passive mode failureLukasz Marek2013-10-12
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* avformat/ftp: fix possible deadlockLukasz Marek2013-10-12
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* lavf/ftp: fix possible crashLukasz Marek2013-08-29
|
* avformat/ftp: make const tables static constMichael Niedermayer2013-08-27
| | | | | Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ftp: warning about pure-ftp server used as and outputLukasz Marek2013-07-17
|
* ftp: commentsLukasz Marek2013-07-17
|
* ftp: remove unused headersLukasz Marek2013-07-17
|
* ftp: fix interrupt callback misuseLukasz Marek2013-07-17
| | | | | | | | | | FTP protocol used interrupt callback to simulate nonblock operation which is a misuse of this callback. This commit make FTP protocol fully blocking and removes invalid usage of interrutp callback Also adds support for multiline responses delimited with dashes
* ftp: add invalid code for RETR operationLukasz Marek2013-06-08
| | | | | | | | | 554 is possible invalid code: - Restart not valid - Command terminated due to server shutdown in progress - etc... Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: probe seek capabilityLukasz Marek2013-06-08
| | | | | | Make FTP streamed when server doesn't accept REST command Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: fix seeking beyond file sizeLukasz Marek2013-06-08
| | | | | | adjust to ff* tools seek nature Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: abort function optimalizationLukasz Marek2013-06-08
| | | | | | | | | It seems some ftp servers doesn't respect ABOR command, but closing both connection is slow. This commit keeps control connection open when possible. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: explicit return code checksLukasz Marek2013-06-08
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: fix flush control connection inputLukasz Marek2013-06-08
| | | | Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: reconnect on tcp read errorLukasz Marek2013-06-08
| | | | | | | This commit reconnect both connections and retries before ftp_read returns an error. Practical use case: resume after lock screen on iOS devices. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: fix using uninitialized valueLukasz Marek2013-06-04
| | | | | | Fix coverity issue CID 1026777 Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
* ftp: enhanced error handlingLukasz Marek2013-05-31
| | | | | Add error codes to expected codes to make responses faster. Success of a command is validated by comparing code to a success code.
* ftp: reconnect on seekLukasz Marek2013-05-31
| | | | | | | | | ABOR command usually takes long (FTP server implementation dependent). It also produces different response codes from different servers. It is save for ffmpeg to reconnect both connection during seek for two reasons: 1. Alreay mentioned heavy manner of ABOR command. 2. Server may disconnected due to no transfer (seek after a long pause in ffmpeg client)
* ftp: move common commands code to functionLukasz Marek2013-05-31
| | | | | Each send command routine requires the same steps. This commit moves repeated code into one function.
* ftp: enhanced status code handlingLukasz Marek2013-05-31
| | | | | | | Reimplementation of ftp_status function. New version requires explicit list of expected codes. It flush data connection input before sending a command and blocks until expected result appears.
* ftp: reconnect on readLukasz Marek2013-05-31
| | | | | | FTP server may disconnect after some period of time when no transfer is done. FTP protocol should reconnect and seek to last position.
* ftp: move create control connection to functionLukasz Marek2013-05-31
| | | | | | Move common code that opens control connection to function. This code can be reused when reconnecting to FTP server after inactivity.
* ftp: credentials moved into FTPContextLukasz Marek2013-05-31
| | | | | | FTP server may disconnect client. This commit stores credentials for future reconnect.
* ftp: rename function nameLukasz Marek2013-05-31
| | | | | | ftp_send_command was used only once. This commit makes this function specific, not generic
* ftp: formatting and typos fixesLukasz Marek2013-05-31
|
* ftp: favor strtoll over atollHendrik Leppkes2013-05-19
| | | | | | | | | Both strtoll and atoll have different names on MSVC, and strtoll has a compatibility layer in place for this case. Fixes compilation on MSVC. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>