summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
Commit message (Collapse)AuthorAge
* 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>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | 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.
* | Merge commit '98063bcf15eb1e9bf9c8758c83c88d51cbb7ace7'Hendrik Leppkes2015-11-29
|\| | | | | | | | | | | | | * commit '98063bcf15eb1e9bf9c8758c83c88d51cbb7ace7': rtsp: Do not assume getnameinfo cannot fail Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtsp: Do not assume getnameinfo cannot failLuca Barbato2015-11-25
| | | | | | | | And properly report the error when it happens.
* | Merge commit 'e02dcdf6bb6835ef4b49986b85a67efcb3495a7f'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'e02dcdf6bb6835ef4b49986b85a67efcb3495a7f': rtsp: Allow $ as interleaved packet indicator before a complete response header Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtsp: Allow $ as interleaved packet indicator before a complete response headerMartin Storsjö2015-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some RTSP servers ("HiIpcam/V100R003 VodServer/1.0.0") respond to our keepalive GET_PARAMETER request by a truncated RTSP header (lacking the final empty line to indicate a complete response header). Prior to 764ec70149, this worked just fine since we reacted to the $ as interleaved packet indicator anywhere. Since $ is a valid character within the response header lines, 764ec70149 changed it to be ignored there. But to keep compatibility with such broken servers, we need to at least allow reacting to it at the start of lines. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1ec611a10228945d2ec8a9cf6c5531dee6b7ee56'Hendrik Leppkes2015-09-16
|\| | | | | | | | | | | | | * commit '1ec611a10228945d2ec8a9cf6c5531dee6b7ee56': rtsp: warning when max_delay reached Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtsp: warning when max_delay reachedEloi BAIL2015-09-16
| | | | | | | | | | | | | | | | | | packets are queued due to packet reordering until the queue reach its maximal size or max delay is reached. This commit adds a warning trace when max delay is reached. Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '764ec70149728be82304c163ccc4e280f1629201'Michael Niedermayer2015-07-30
|\| | | | | | | | | | | | | * commit '764ec70149728be82304c163ccc4e280f1629201': rtsp: Only interpret $ as interleaved packet indicator at the start of replies Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * rtsp: Only interpret $ as interleaved packet indicator at the start of repliesMartin Storsjö2015-07-30
| | | | | | | | | | | | | | | | | | | | | | | | Allow $ as character anywhere within normal RTSP replies - both within the lines, and as the first character of RTSP header lines. (The existing old comment indicated that an inline packet could start at any line within a RTSP reply header, but that doesn't sound valid to me, and I'm not sure if the existing code handled that correctly either.) CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtsp: print a debug level note if time parsing failsMichael Niedermayer2015-05-15
| | | | | | | | | | | | Fixes CID733718 again This partly reverts commit eb7ddb5066843ab16caf33b05eafb2576648b797.
* | Merge commit 'b90adb0aba073f9c1b4abca852119947393ced4c'Michael Niedermayer2015-04-24
|\| | | | | | | | | | | | | * commit 'b90adb0aba073f9c1b4abca852119947393ced4c': rtsp: Make sure we don't write too many transport entries into a fixed-size array Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Make sure we don't write too many transport entries into a fixed-size ↵Martin Storsjö2015-04-24
| | | | | | | | | | | | | | array CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'eb7ddb5066843ab16caf33b05eafb2576648b797'Michael Niedermayer2015-04-24
|\| | | | | | | | | | | | | * commit 'eb7ddb5066843ab16caf33b05eafb2576648b797': rtsp: Don't warn about unparsed time ranges Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Don't warn about unparsed time rangesMartin Storsjö2015-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the error logging added in 4e54432164. This avoids warnings about "Invalid interval start specification 'now'" for live rtsp streams. We only try to parse some of the many valid values for time ranges in RTSP - the other ones are fully valid but not interesting for the use case in rtsp.c, so we shouldn't warn about them. (Parsing the time ranges is needed to allow seeking, but e.g. setting the current realtime clock for the start time doesn't make sense. av_parse_time has got a different mode for parsing absolute times as well, which can handle the special case "now", but that doesn't make much sense for this particular use in rtsp.c.) Signed-off-by: Martin Storsjö <martin@martin.st>
* | 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.
| * rtsp: Fix unchecked return valueHimangi Saraogi2015-04-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtsp: Check a malloc return valueHimangi Saraogi2015-04-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/rtsp: Fix dereference after null checkHimangi Saraogi2015-04-12
| | | | | | | | | | | | | | This fixes CID 732219 Reviewed-by: Thomas Volkert <silvo@gmx.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/rtsp: Fix unchecked return valueHimangi Saraogi2015-04-10
| | | | | | | | | | Reviewed-by: Thomas Volkert <silvo@gmx.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/rtsp: Fix null pointer dereferenceHimangi Saraogi2015-04-04
| | | | | | | | | | | | This fixes CID 1257827. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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>
* | avformat/rtsp: Fix potential pointer overflow in sdp_probe()Michael Niedermayer2015-03-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA"Gilles Chanteperdrix2015-03-01
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 26524e358147aade6e9dd18fff42d61b966bbc70. If we want the T.140 codec to have the AV_CODEC_ID_TEXT codec id, its type needs to be AVMEDIA_TYPE_SUBTITLE, so, keep interpreting the text media type as AVMEDIA_TYPE_SUBTITLE. Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd': rtpdec: Rename the free method to close Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Rename the free method to closeMartin Storsjö2015-02-24
| | | | | | | | | | | | | | | | | | Many of these functions were named foo_free_context, and since the functions no longer should free the context itself, only allocated elements within it, the previous naming was slightly misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a': libavformat: Use ffio_free_dyn_buf where applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>