summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
Commit message (Collapse)AuthorAge
* lavf/rtmpproto: Make bytes_read variables 64bit.Carl Eugen Hoyos2017-01-25
| | | | | | | | | When bytes_read overflowed, last_bytes_read did not yet overflow and no bytes-read report was created leading to a timeout. Analyzed-by: Thomas Bernhard Fixes ticket #5836.
* avformat/rtmpproto: Fix RTMP control message handling error in listen mode.Hiroyuki OYAMA2016-10-21
| | | | | | | Fix problem to fail by a RTMP Control Message except "Set Chunk Size (1)" after an RTMP handshake. When 'nginx-rtmp-module' relays an RTMP, it sends not only control message 'Set Chunk Size (1)' but also 'Window Acknowledgement Size (5)'. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | 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>
| * avio: Copy URLContext generic options into child URLContextsMartin Storsjö2016-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * urlprotocol: receive a list of protocols from the callerAnton Khirnov2016-02-22
| | | | | | | | | | This way, the decisions about which protocols are available for use in any given situations can be delegated to the caller.
* | 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>
| * lavf: reorganize URLProtocolsAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | | | | | 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.
* | 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>
* | Merge commit '64f8c439fd663fec4d57ac21af572d498fe21f7a'Hendrik Leppkes2016-01-01
|\| | | | | | | | | | | | | * commit '64f8c439fd663fec4d57ac21af572d498fe21f7a': rtmpproto: Include the full path as app when "slist=" is found Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtmpproto: Include the full path as app when "slist=" is foundMartin Storsjö2015-12-13
| | | | | | | | | | | | | | This matches what librtmp does. This fixes automatic url parsing of crunchyroll urls. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37'Hendrik Leppkes2015-10-14
|\| | | | | | | | | | | | | * commit 'e55376a1fd5abebbb0a082aa20739d58c2260a37': rtmpproto: Write correct flv packet sizes at the end of packets Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtmpproto: Write correct flv packet sizes at the end of packetsMichael Niedermayer2015-10-14
| | | | | | | | | | | | | | In one case it was written as zero, one case left it uninitialized, missed the 11 bytes for the flv header. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * rtmpproto: free hmac context properlyJames Almer2015-07-30
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtmpproto: use AVHMAC instead of a custom implementationJames Almer2015-07-29
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtmpproto: Fix 2 more cases of the 2nd packet size being wrongMichael Niedermayer2015-10-02
| | | | | | | | | | | | | | This should fix RTMP input which was broken by cbbd906be6150be38dfc14b6bc67dcac8da8aea4 the 40 + 11 case is untested as it did not occur in the testcase Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/rtmpproto: Fix 2nd packet sizeMichael Niedermayer2015-09-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/rtmpproto: free hmac context properlyJames Almer2015-07-29
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/rtmpproto: use AVHMAC instead of a custom implementationJames Almer2015-07-29
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/rtmpproto: increase hardcoded url/path lengthsPaul B Mahol2015-07-01
| | | | | | | | | | | | Fixes #4103. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | avformat/rtmpproto: Use av_freep() to avoid leaving stale pointers in memoryMichael Niedermayer2014-12-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '491805636cef50d3f582bd345e1460eeb739ea48'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | * commit '491805636cef50d3f582bd345e1460eeb739ea48': rtmpproto: Fix a typo in a comment Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Fix a typo in a commentMartin Storsjö2014-11-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '01eac895ab350027467ffbe7278740f89ae8be75'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | | | | | | | | | * commit '01eac895ab350027467ffbe7278740f89ae8be75': rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccess Conflicts: libavformat/rtmpproto.c See: 60fd790f381cd404ffdafa8a86a6dc93c9d80f99 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Only prepend @setDataFrame for onMetaData and |RtmpSampleAccessMartin Storsjö2014-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when streaming to an RTMP server, any time a packet of type RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame before it gets sent to the server. This is incorrect; only packets for onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP server. Specifically, the current bug manifests itself when trying to stream onTextData or onCuePoint invocations. This fix addresses that problem and ensures that the @setDataFrame is only prepended for onMetaData and |RtmpSampleAccess. Since data is fed to the rtmp_write function in smaller pieces (depending on the calling IO buffer size), we can't generally assume that the whole packet (or even the whole command string) is available at once, therefore we can only check the command string once the full packet has been transferred to us for sending. Based on a patch by Jeffrey Wescott. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | | | | | | | * commit '3c3b8003a13d9c3668c0bb6d79d2376da3b2b352': rtmpproto: Simplify code for copying data into the output packet Conflicts: libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Simplify code for copying data into the output packetMartin Storsjö2014-11-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '857e6667f9061ae261c0b951113e4efc4329b05e'Michael Niedermayer2014-11-28
|\| | | | | | | | | | | | | | | | | | | * commit '857e6667f9061ae261c0b951113e4efc4329b05e': rtmpproto: Clarify a comment Conflicts: libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Clarify a commentMartin Storsjö2014-11-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtmpproto: only prepend @setMetaData for onMetaData and ↵Jeffrey Wescott2014-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |RtmpSampleAccess In current versions of ffmpeg, when streaming to an RTMP server, anytime a packet of type RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame before it gets sent to the server. This is incorrect; only packets for onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP server. Specifically, the current bug manifests itself when trying to stream onTextData or onCuePoint invocations. This fix addresses that problem and ensures that the @setDataFrame is only prepended for onMetaData and |RtmpSampleAccess. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a490391157dcf4dc6b65352ec3eea2781dd0a404'Michael Niedermayer2014-11-05
|\| | | | | | | | | | | | | | | | | | | | | * commit 'a490391157dcf4dc6b65352ec3eea2781dd0a404': rtmpproto: Ignore errors from the getStreamLength method Conflicts: libavformat/rtmpproto.c See: 09711545f5d256bd3ac77004d123dae36c5db8f9 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Ignore errors from the getStreamLength methodMartin Storsjö2014-11-05
| | | | | | | | | | | | | | | | | | | | It is never an error if this method failed. If rt->live was explicitly set to 0 (known to be a recorded file), print it as a warning, otherwise print it as a debug message. Based on a patch by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtmpproto: remove dead codeVittorio Giovara2014-10-20
| | | | | | | | | | | | | | Expression already evaluated before, redundant since 053386864219eccbcca1886c55f902f9555428a5. Bug-Id: CID 732199
* | avformat/rtmpproto: Do not fail when the length cannot be determined for ↵Michael Niedermayer2014-11-04
| | | | | | | | | | | | | | | | live streams Fixes Ticket4071 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | rtmpproto: Don't mistake app for playpath.Kacper Michajłow2014-10-19
| | | | | | | | | | | | | | | | | | For URLs "rtmp://server[:port]/foo" determine what `foo` refers to. If application name has been defined by the user assume that `foo` is a playpath, otherwise assume application name. Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '0034314a69e76a53534a74cceef865cfcb7b42cc'Michael Niedermayer2014-10-18
|\| | | | | | | | | | | | | * commit '0034314a69e76a53534a74cceef865cfcb7b42cc': rtmp: Always call rtmp_close() on rtmp_open() failure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: Always call rtmp_close() on rtmp_open() failureAlexander Drozdov2014-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Prevent possible memory leaks. Connect to nginx and request a non-existent resource to trigger the issue. CC: libav-stable@libav.org Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Uwe L. Korn <uwelk@xhochy.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit '9bec3ca2b878c83d2337bc6095bd51c3e3f8eef0'Michael Niedermayer2014-10-18
|\| | | | | | | | | | | | | | | | | | | * commit '9bec3ca2b878c83d2337bc6095bd51c3e3f8eef0': rtmpproto: Add pause support Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Add pause supportUwe L. Korn2014-10-17
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467'Michael Niedermayer2014-10-18
|\| | | | | | | | | | | | | * commit 'f4cd8b80b9cb2a9a4112d8abb1d3b93cd3b4e467': rtmpproto: Track last received timestamp Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Track last received timestampUwe L. Korn2014-10-17
| | | | | | | | | | | | | | | | Some RTMP commands need the most recent timestamp as their parameter, so keep track of it. This must be the most recent one and not e.g. the max received timestamp as it can decrease again through seeking. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e65c776d18dc14df8a279e017760862f9fc8763b'Michael Niedermayer2014-10-17
|\| | | | | | | | | | | | | * commit 'e65c776d18dc14df8a279e017760862f9fc8763b': rtmpproto: Add getStreamLength call to query duration Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Add getStreamLength call to query durationUwe L. Korn2014-10-17
| | | | | | | | | | | | | | | | | | | | In (non-live) streams with no metadata, the duration of a stream can be retrieved by calling the RTMP function getStreamLength with the playpath. The server will return a positive duration upon the request if the duration is known, otherwise either no response or a duration of 0 will be returned. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '324b23dde1bc8638959eb32419c95a93906db272'Michael Niedermayer2014-10-17
|\| | | | | | | | | | | | | * commit '324b23dde1bc8638959eb32419c95a93906db272': rtmpproto: Add function to read a number response Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Add function to read a number responseUwe L. Korn2014-10-17
| | | | | | | | | | | | | | | | | | Packets that contain a number as a result to a rtmp function call are structured the same way (String, Number, Null, Number). This new method also includes more bounds checks to better handle packets that are not structured as expected. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '79dd756e143a54efc25d64e90505f0dca6cbc4ec'Michael Niedermayer2014-10-16
|\| | | | | | | | | | | | | * commit '79dd756e143a54efc25d64e90505f0dca6cbc4ec': rtmpproto: Fix a typo Merged-by: Michael Niedermayer <michaelni@gmx.at>