summaryrefslogtreecommitdiff
path: root/libavformat/rtspdec.c
Commit message (Collapse)AuthorAge
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Split version.hMartin Storsjö2022-03-16
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/rtspdec: get rid of the hardcoded max size for sdpLimin Wang2021-12-04
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-20
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtsp: add support for satip://Aman Karmani2020-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SAT>IP protocol[1] is similar to RTSP. However SAT>IP servers are assumed to speak only MP2T, so DESCRIBE is not used in the same way. When no streams are active, DESCRIBE will return 404 according to the spec (see section 3.5.7). When streams are active, DESCRIBE will return a list of all current streams along with information about their signal strengths. Previously, attemping to use ffmpeg with a rtsp:// url that points to a SAT>IP server would work with some devices, but fail due to 404 response on others. Further, if the SAT>IP server was already streaming, ffmpeg would incorrectly consume the DESCRIBE SDP response and join an existing tuner instead of requesting a new session with the URL provided by the user. These issues have been noted by many users across the internet[2][3][4]. This commit adds proper spec-compliant support for SAT>IP, including: - support for the satip:// psuedo-protocol[5] - avoiding the use of DESCRIBE - parsing and consuming the com.ses.streamID response header - using "Transport: RTP/AVP;unicast" because the optional "/UDP" suffix confuses some servers This patch has been validated against multiple SAT>IP vendor devices: - Telestar Digibit R2 (https://telestar.de/en/produkt/digibit-r1-2/) - Kathrein EXIP 418 (https://www.kathrein-ds.com/en/produkte/sat-zf-verteiltechnik/sat-ip/227/exip-418) - Kathrein EXIP 4124 (https://www.kathrein-ds.com/en/products/sat-if-signal-distribution/sat-ip/226/exip-4124) - Megasat MEG-8000 (https://www.megasat.tv/produkt/sat-ip-server-3/) - Megasat Twin (https://www.megasat.tv/en/produkt/sat-ip-server-twin/) - Triax TSS 400 (https://www.conrad.com/p/triax-tss-400-mkii-sat-ip-server-595256) [1] https://www.satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf [2] https://stackoverflow.com/questions/61194344/does-ffmpeg-violate-the-satip-specification-describe-syntax [3] https://github.com/kodi-pvr/pvr.iptvsimple/issues/196 [4] https://forum.kodi.tv/showthread.php?tid=359072&pid=2995884#pid2995884 [5] https://www.satip.info/resources/channel-lists/
* avformat/rtsp: prefer to use MAX_URL_SIZE for url and command bufferLimin Wang2020-12-05
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtspdec: fix potential mem leak in listen modeAndriy Gelman2020-11-28
| | | | | | | | | Currently a repeating setup request (with the same stream id) will simply overwrite rtp_handle/transport_priv without freeing the resources first. This is fixed by closing the previous setup request. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: show method request in logAndriy Gelman2020-11-28
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: cosmeticsAndriy Gelman2020-11-21
| | | | | | Make error check style consistent with rest of function. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: fix mem leaks in connect mode if init failsAndriy Gelman2020-11-21
| | | | | | | Fixes #6334 Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: fix mem leaks in listen mode if init failsAndriy Gelman2020-11-21
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: add network init to listen modeAndriy Gelman2020-11-21
| | | | | | | | | | | | | As per the docs network initialization is required before ff_url_join(). Furthermore, because the ff_network_init() was skipped, this makes one additional call to ff_network_close() if the stream exits without errors. The was forgotten in the origin commit of the listen mode: a8ad6ffafe89e3a83f343f69249338e8245816f7 Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: return proper error codeLimin Wang2020-11-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtspdec: use SDP_MAX_SIZE for sdp arrayLimin Wang2020-11-11
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtspdec: add newline in log messageAndriy Gelman2020-10-08
| | | | Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avformat/rtspdec: av_dict_set() -> av_dict_set_int()Limin Wang2020-06-02
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* rtspdec: Fix return errorDerek Buitenhuis2017-07-10
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit '67351924fa91dea4339109100a4c0689f006581f'Clément Bœsch2017-03-30
|\ | | | | | | | | | | | | * commit '67351924fa91dea4339109100a4c0689f006581f': Drop unreachable break and return statements Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Drop unreachable break and return statementsDiego Biurrun2016-11-03
| |
* | 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>
| * 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.
* | 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>
* | Merge commit '2c17fb61ced2059034856a6c6cd303014aed01fe'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit '2c17fb61ced2059034856a6c6cd303014aed01fe': rtsp: Log getaddrinfo failures Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtsp: Log getaddrinfo failuresLuca Barbato2015-11-25
| | | | | | | | And forward the logging contexts when needed.
| * lavf: split tls.cwm42015-05-26
| | | | | | | | | | | | | | | | Move the OpenSSL and GnuTLS implementations to their own files. Other than the connection code (including options) and some boilerplate, no code is actually shared. Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: split tls.cwm42015-05-27
| | | | | | | | | | | | | | | | Move the OpenSSL and GnuTLS implementations to their own files. Other than the connection code (including options) and some boilerplate, no code is actually shared. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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.
* | Merge commit 'e3ec6fe7bb2a622a863e3912181717a659eb1bad'Michael Niedermayer2015-04-01
|\| | | | | | | | | | | | | | | | | | | * commit 'e3ec6fe7bb2a622a863e3912181717a659eb1bad': rtsp: Add a buffer_size option Conflicts: libavformat/rtsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Add a buffer_size optionLuca Barbato2015-04-01
| | | | | | | | | | | | And forward it to rtp and udp. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'cdcc370293a159c321e41af7f0eef141c62d698d'Michael Niedermayer2015-02-23
|\| | | | | | | | | | | | | | | * commit 'cdcc370293a159c321e41af7f0eef141c62d698d': rtsp: punch holes again after pause See: 22bb5bd7a3b55c25bfef130ad89e8574dd47af1d Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: punch holes again after pauseGilles Chanteperdrix2015-02-23
| | | | | | | | | | | | | | | | | | | | | | | | When a client behind a NAT issues a pause command, and stay paused for a long time, the router may stop the RTP/RTCP port redirection. Resend the hole punching packets before each PLAY command to cause the router to restart the port redirection in that case. Move the existing code for sending the packets from the SETUP phase to the PLAY phase. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtsp: punch holes again after pauseGilles Chanteperdrix2015-02-22
| | | | | | | | | | | | | | | | | | | | When a client behind a NAT issues a pause command, and stay paused for a long time, the router may stop the RTP/RTCP port redirection. Resend the hole punching packets after each PLAY command to cause the router to restart the port redirection in that case. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9108967513fcaff3d55514a7bca4c9fbba128c71'Michael Niedermayer2015-01-23
|\| | | | | | | | | | | | | * commit '9108967513fcaff3d55514a7bca4c9fbba128c71': rtspdec: Consistently use rtsp_hd_out for writing Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtspdec: Consistently use rtsp_hd_out for writingMartin Storsjö2015-01-23
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea'Michael Niedermayer2014-10-24
|\| | | | | | | | | | | | | | | | | | | | | * commit '6df9d9b55d3f56ee7782639a7678eeeaf77f14ea': lavf: Use av_gettime_relative Conflicts: libavformat/hls.c See: f78bc96b7c1c74caf99a7139cf81ce1110404965 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Use av_gettime_relativeMartin Storsjö2014-10-24
| | | | | | | | | | | | | | | | | | The ones left using av_gettime are NTP timestamps (for RTCP, which is specified to send the actual current realtime clock in RTCP SR packets), and the NUT muxer timestamper, which is documented as using wallclock time. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtsp: Use ff_rtsp_averror()Andrey Utkin2014-10-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3df8d52fcdc9036b4074fdc612d487ece8bb5b7f'Michael Niedermayer2014-10-10
|\| | | | | | | | | | | | | * commit '3df8d52fcdc9036b4074fdc612d487ece8bb5b7f': rtsp: Add rtsps to the probe Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Add rtsps to the probeLuca Barbato2014-10-10
| |
* | Merge commit 'c839b0439f0b01c72a6d253920d2e342b30f8bcb'Michael Niedermayer2014-10-10
|\| | | | | | | | | | | | | * commit 'c839b0439f0b01c72a6d253920d2e342b30f8bcb': rtsp: Support tls when in listen mode Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Support tls when in listen modeLuca Barbato2014-10-10
| |
* | Merge commit 'c27328e749ff3be648411765cd17362fee017341'Michael Niedermayer2014-10-10
|\| | | | | | | | | | | | | | | | | | | | | * commit 'c27328e749ff3be648411765cd17362fee017341': rtsp: Check for command strings without spaces Conflicts: libavformat/rtspdec.c See: a0568ed2544025de3c66dd500811f5ba43f38af4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Check for command strings without spacesLuca Barbato2014-10-10
| | | | | | | | | | | | Prevent a NULL-pointer dereference. CC: libav-stable@libav.org