From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C47204865A for ; Sat, 13 Jan 2024 18:22:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 697FC68CF5C; Sat, 13 Jan 2024 20:22:27 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2925E68CC03 for ; Sat, 13 Jan 2024 20:22:20 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 75FFC1BF204 for ; Sat, 13 Jan 2024 18:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1705170139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=46QFURGE114T3EKaYC2sr9R1NW9s+84SNFmDe7YHees=; b=dmvTo5QcygyzCFU24Y+bpX3nNv0J8u+DafGLbB1XELLaB11ZunaKidUPA+Ae3opmOB3yNr 0M0a/jAlI0f2bCPRuOqw8i4OtnZLeLHpGJgWU5ZcDGlg14P3tYvObJLuYtlDvrcsIrisiq crxzecjCYnWoQH7GUaCxS+0oJkIEMvyqWTfqadEDGTxRxWOU+uOGxiQxFMzUYcRgVG0DVL BAHE7ndMrOFIoIFaS1GbNVzqI5nsdmGJtFGLC4zGMEjxUq1gLExgS3kmcAMOTNwMXm51mc SeL+/BkvDslXQR9YyWatsx7Z38ZjLvXDsgpDD+lhX90AadVAbuUxyEA6b+YW6w== Date: Sat, 13 Jan 2024 19:22:18 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240113182218.GE6420@pb2> References: <20231228193329.GV6420@pb2> <20240112190710.GZ6420@pb2> <4c74ce27-ee9a-4315-903f-d971dc63cf5b@gmail.com> MIME-Version: 1.0 In-Reply-To: <4c74ce27-ee9a-4315-903f-d971dc63cf5b@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avformat/rtsp: Fix server compatibility issues with rtspclientsink GStreamer plugin X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============6136855568402603467==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6136855568402603467== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BxwxHi8WBrXcOI0D" Content-Disposition: inline --BxwxHi8WBrXcOI0D Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2024 at 10:46:41PM +0200, Paul Orlyk wrote: > On 1/12/24 21:07, Michael Niedermayer wrote: > > On Wed, Jan 03, 2024 at 02:51:36PM +0200, Paul Orlyk wrote: > > > On 12/28/23 21:33, Michael Niedermayer wrote: > > > > On Wed, Dec 27, 2023 at 03:44:09PM +0200, Paul Orlyk wrote: > > > > > mode field in Transport header can be sent in upper case so make = string > > > > > comparison case insensitive. > > > > > Also, GStreamer expects to see mode=3Drecord instead of mode=3Dre= ceive in > > > > > Transport header in response. > > > > >=20 > > > > > Signed-off-by: Paul Orlyk > > > > > --- > > > > > libavformat/rtsp.c | 4 ++-- > > > > > libavformat/rtspdec.c | 4 ++-- > > > > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > >=20 > > > > > diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c > > > > > index 583f5338e8..61e24a5c7a 100644 > > > > > --- a/libavformat/rtsp.c > > > > > +++ b/libavformat/rtsp.c > > > > > @@ -1012,8 +1012,8 @@ static void rtsp_parse_transport(AVFormatCo= ntext *s, > > > > > if (*p =3D=3D '=3D') { > > > > > p++; > > > > > get_word_sep(buf, sizeof(buf), ";, ", &p); > > > > > - if (!strcmp(buf, "record") || > > > > > - !strcmp(buf, "receive")) > > > > > + if (!av_strcasecmp(buf, "record") || > > > > > + !av_strcasecmp(buf, "receive")) > > > > > th->mode_record =3D 1; > > > > > } > > > > > } > > > > > diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c > > > > > index 39fd92fb66..d6a223cbc6 100644 > > > > > --- a/libavformat/rtspdec.c > > > > > +++ b/libavformat/rtspdec.c > > > > > @@ -303,7 +303,7 @@ static int rtsp_read_setup(AVFormatContext*s,= char* > > > > > host, char *controlurl) > > > > > rtsp_st->interleaved_min =3D request.transports[0].int= erleaved_min; > > > > patch is damaged by linebreaks > > > >=20 > > > >=20 > > > > [...] > > >=20 > > >=20 > > > Sorry for that. Please find it attached. > >=20 > > > rtsp.c | 4 ++-- > > > rtspdec.c | 4 ++-- > > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > 8ed5709b8c5cb30aeaa18d609b86b9be0557a06e 0001-avformat-rtsp-Fix-serv= er-compatibility-issues-with-r.patch > > > From 156ceeded6cd076b781205adc034144186a9a7ea Mon Sep 17 00:00:00 20= 01 > > > From: Paul Orlyk > > > Date: Wed, 27 Dec 2023 15:30:20 +0200 > > > Subject: [PATCH] avformat/rtsp: Fix server compatibility issues with > > > rtspclientsink GStreamer plugin > > >=20 > > > mode field in Transport header can be sent in upper case so make stri= ng comparison case insensitive. > >=20 > > > Also, GStreamer expects to see mode=3Drecord instead of mode=3Dreceiv= e in Transport header in response. > >=20 > > It appears to me that these are 2 seperate issues ? > > if its 2 patches, i can apply the av_strcasecmp(). >=20 > Essentially they are. I combined them in the context of GStreamer compati= bility. > Would it be better at this point to send them separately? yes >=20 > >=20 > > For the receive vs record i would prefer to see some quote from a RFC i= nstead > > of just an implementation > >=20 > > thx > >=20 > > [...] >=20 > Regarding receive vs record: >=20 > RFC 7826 "Real-Time Streaming Protocol Version 2.0" (https://datatracker.= ietf.org/doc/html/rfc7826), section 18.54: > mode: The mode parameter indicates the methods to be supported for > this session. The currently defined valid value is "PLAY". If > not provided, the default is "PLAY". The "RECORD" value was > defined in RFC 2326; in this specification, it is unspecified > but reserved. RECORD and other values may be specified in the > future. > RFC 2326 "Real Time Streaming Protocol (RTSP)" (https://datatracker.ietf.= org/doc/html/rfc2326), section 12.39: > mode: > The mode parameter indicates the methods to be supported for > this session. Valid values are PLAY and RECORD. If not > provided, the default is PLAY. Please add this to teh commit message also if you can test with anything else than gstreamer, that would be great rtsp/rtp is often regarded as a bit picky. Reason why iam hesitant with applying patches on this, is i am affraid fixi= ng it in one case could break another also if you can check git blame, why it was wrong, and add this too to the commit message (like this was always this way or it is a regression sin= ce) that also adds information. thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If the United States is serious about tackling the national security threat= s=20 related to an insecure 5G network, it needs to rethink the extent to which = it values corporate profits and government espionage over security.-Bruce Schn= eier --BxwxHi8WBrXcOI0D Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZaLU1AAKCRBhHseHBAsP q/6LAJ0TTubzlY3z9VRW+0dTMV21amVIpwCfWWfu5rptX+yHL88EcQ/+OXHMZPA= =h37z -----END PGP SIGNATURE----- --BxwxHi8WBrXcOI0D-- --===============6136855568402603467== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============6136855568402603467==--