summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
Commit message (Collapse)AuthorAge
* libavformat/rtsp: return error if rtsp_hd_out is null instead of crashRoss Nicholson2019-09-27
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'James Almer2019-05-02
|\ | | | | | | | | | | | | * commit '1e56173515826aa4d680d3b216d80a3879ed1c68': rtsp: add pkt_size option Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: add pkt_size optionTristan Matthews2019-04-15
| | | | | | | | | | | | | | This allows users to specify an upper limit on the size of outgoing packets when publishing via RTSP. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf/rtsp.c: Fix stimeout option not applied on http tunnelJun Li2019-04-15
| | | | | | | | | | | | | | | | | | stimeout option is already used in tcp transport, since http is based on tcp, pass the option to http for tunneling case. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Li <junli1026@gmail.com>
* | Revert "lavf/rtsp.c: Fix stimeout option not applied on http tunnel"Steven Liu2019-04-15
| | | | | | | | This reverts commit 1ae8a1073ba8a3ceb9f51d9350785c27530aa469.
* | lavf/rtsp.c: Fix stimeout option not applied on http tunnelSigned-off-by: Jun Li2019-04-15
| | | | | | | | | | | | | | | | | | stimeout option is already used in tcp transport, since http is based on tcp, pass the option to http for tunneling case. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Li <junli1026@gmail.com>
* | Revert "lavf/rtsp.c: Fix stimeout option not applied on http tunnel"Steven Liu2019-04-15
| | | | | | | | This reverts commit f502bd5432c9d7a34392ec3147bc5b5e3a868d9c.
* | lavf/rtsp.c: Fix stimeout option not applied on http tunnelSteven Liu2019-04-15
| | | | | | | | | | | | | | | | | | stimeout option is already used in tcp transport, since http is based on tcp, pass the option to http for tunneling case. Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Jun Li <junli1026@gmail.com>
* | avformat/doc, http, icecast, rtsp: Add option to disable send-expect-100Jun Li2019-03-31
| | | | | | | | | | | | | | | | | | | | Fix ticket #7297 The current setting for send-expect-100 option is either enabled if applicable or forced enabled, no option to force disable the header. This change is to expand the option setting to provide more flexibility, which is useful for rstp case. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/rtsp: Add https tunneling supportJun Li2019-03-25
| | | | | | | | | | Add https based tunneling for RTSP/RTP. Tested on Axis and Bosch cameras. Https is widely used for security consideration.
* | lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | | | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* | avformat/rtsp: Check number of streams in sdp_parse_line()Michael Niedermayer2019-01-31
| | | | | | | | | | | | | | | | Fixes: OOM Found-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Michael Hanselmann <public@hansmi.ch> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()Michael Niedermayer2019-01-31
| | | | | | | | | | | | | | | | Fixes: Infinite loop Found-by: Michael Hanselmann <public@hansmi.ch> Reviewed-by: Michael Hanselmann <public@hansmi.ch> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/rtpdec: Constify several pointers.Carl Eugen Hoyos2018-02-11
| | | | | | | | | | | | Fixes two warnings: libavformat/rtpdec.c:155:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] libavformat/rtpdec.c:168:20: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
* | rtsp: rename certain options after a deprecation periodwm42018-02-04
| | | | | | | | | | | | The "timeout" option name inherently clashes with the meaning of the HTTP libavformat protocol option with the same name. Rename it after a deprecation period to make it compatible with the HTTP one.
* | avformat: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | Merge commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5'James Almer2017-12-10
|\| | | | | | | | | | | | | * commit 'f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5': rtsp: only break on parse_rtsp_message on error Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: only break on parse_rtsp_message on errorTristan Matthews2017-11-30
| | | | | | | | | | | | | | | | | | Fix suggested by Luca Barbato. This was causing spurious EOFs when using -rtsp_transport udp, as reported in https://bugzilla.libav.org/show_bug.cgi?id=1103 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * lavf: make avio_read_partial() publicwm42017-08-30
| | | | | | | | | | | | | | Main use-case is proxying avio through a foreign I/O layer and a custom AVIO context, without losing latency and performance characteristics. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * rtsp: Move message parsing to a separate functionLuca Barbato2017-03-21
| | | | | | | | | | Make easier to handle the polling function before we implement full threading support.
* | rtsp: Move message parsing to a separate functionLuca Barbato2017-10-06
| | | | | | | | | | | | | | | | Make easier to handle the polling function before we implement full threading support. (cherry picked from libav commit ca960161f087ca38267b88ce90592010c59584f1) Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '79331df362fb05a0d04ca9489c87e5b80077a3f4'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit '79331df362fb05a0d04ca9489c87e5b80077a3f4': rtsp: Lazily set up the pollfd array once Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: Lazily set up the pollfd array onceLuca Barbato2017-02-28
| |
* | Merge commit '5263f464db5f2df74ddf712f6d1221b24475fa8e'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit '5263f464db5f2df74ddf712f6d1221b24475fa8e': rtsp: Lazily allocate the pollfd array Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: Lazily allocate the pollfd arrayLuca Barbato2017-02-27
| | | | | | | | And use av_malloc_array.
* | Merge commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit 'b9b82151a1aaa8bbf389853a6142c4e101d80b86': rtsp: Move the pollfd setup out of the for loop Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: Move the pollfd setup out of the for loopLuca Barbato2017-02-27
| |
* | Merge commit '150e99d694f33ab9ad678834964909aa315d14a1'James Almer2017-10-03
|\| | | | | | | | | | | | | * commit '150e99d694f33ab9ad678834964909aa315d14a1': rtsp: Factor out packet reading Merged-by: James Almer <jamrial@gmail.com>
| * rtsp: Factor out packet readingLuca Barbato2017-02-27
| |
* | lavf: make avio_read_partial() publicwm42017-09-01
| | | | | | | | | | | | | | | | | | Main use-case is proxying avio through a foreign I/O layer and a custom AVIO context, without losing latency and performance characteristics. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Merged from Libav commit 173b56218f39c64.
* | Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-31
|\| | | | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-08
| |
| * rtsp: Fix a crash with the RTSP muxerMartin Storsjö2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced in bc2a32969e. The whole block that the statement was added to is only relevant when used as a demuxer, but the other statements there have had other if statements guarding them. Make sure to only run this whole block if being used as a demuxer. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf/rtsp: Fix a crash with the RTSP muxer.Martin Storsjö2016-09-15
| | | | | | | | | | | | | | | | | | | | | | Introduced in 00e122bc / bc2a3296 The whole block that the statement was added to is only relevant when used as a demuxer, but the other statements there have had other if statements guarding them. Make sure to only run this whole block if being used as a demuxer. Fixes ticket #5844.
* | lavf: forward protocol_whitelist for the remaining casesAndreas Cadhalpun2016-08-05
| | | | | | | | | | | | | | Also set a default_whitelist for mmsh and ffrtmphttp. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '3fdffc032e8ea5676bc0c2551b900c0dc887835b'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit '3fdffc032e8ea5676bc0c2551b900c0dc887835b': rtsp: Use avcodec_descriptor_get instead of avcodec_find_decoder Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtsp: Use avcodec_descriptor_get instead of avcodec_find_decoderMartin Storsjö2016-05-25
| | | | | | | | | | | | | | This is only used for logging a human readable codec name for debugging. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'bc2a32969eb4db17677971def5ad5b936d9d1648'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit 'bc2a32969eb4db17677971def5ad5b936d9d1648': rtsp: Parse SSRC attributes in the SDP Merged-by: Clément Bœsch <u@pkh.me>
| * rtsp: Parse SSRC attributes in the SDPMartin Storsjö2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | When feeding input RTP packets to the depacketizer via custom IO, it needs to pick the right stream using the payload type for RTP packets, and using the SSRC for RTCP packets. If the first packet is an RTCP packet, we don't (currently) know the SSRC yet and thus can't pick the right RTP depacketizer to handle it. By parsing the SSRC attribute in the SDP, we can map initial RTCP packets to the right stream. Signed-off-by: Martin Storsjö <martin@martin.st>
* | 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>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
| * lavf: add a protocol whitelist/blacklist for file opened internallyAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | Should make the default behaviour safer for careless callers that open random untrusted files. Bug-Id: CVE-2016-1897 Bug-Id: CVE-2016-1898
| * 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.
| * rtsp: free opts dictionary on failure of getnameinfoGanesh Ajjanagadde2015-12-07
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | rtp: Fix play multiple multicast streams with the same portZhao Zhili2016-03-07
| | | | | | | | | | | | | | | | | | | | We cannot play multiple multicast streams with the same port at the same time. This is because both rtp and rtcp port are opened in read-write mode, so they will not bind to the multicast address. Try to make rtp port as read-only by default to solve this bug. Signed-off-by: Zhao Zhili <wantlamy@gmail.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>
* | 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/rtsp: free opts dictionary on failure of getnameinfoGanesh Ajjanagadde2015-12-06
| | | | | | | | | | | | | | Fixes: CID 1341579. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>