Re: [FFmpeg-devel] [PATCH] lavf: forward protocol_whitelist for the remaining cases

2016-08-05 Thread Michael Niedermayer
On Sun, Feb 28, 2016 at 02:42:41AM +0100, Michael Niedermayer wrote:
> On Wed, Feb 03, 2016 at 11:20:05PM +0100, Andreas Cadhalpun wrote:
> > On 03.02.2016 03:41, Michael Niedermayer wrote:
> > > On Wed, Feb 03, 2016 at 01:51:55AM +0100, Andreas Cadhalpun wrote:
> > >> @@ -274,4 +282,5 @@ URLProtocol ff_ffrtmphttp_protocol = {
> > >>  .priv_data_size = sizeof(RTMP_HTTPContext),
> > >>  .flags  = URL_PROTOCOL_FLAG_NETWORK,
> > >>  .priv_data_class= _class,
> > >> +.default_whitelist = "https,http,tcp",
> > > 
> > > if it needs https it might need tls too
> > 
> > Yes, updated patch attached.
> > 
> > Best regards,
> > Andreas
> > 
> 
> >  mmsh.c |9 +
> >  rtmphttp.c |9 +
> >  rtsp.c |8 
> >  3 files changed, 26 insertions(+)
> > ac9de87a225e549ae03722a3fc487cb22be5802a  
> > 0001-lavf-forward-protocol_whitelist-for-the-remaining-ca.patch
> > From 595133afad21a4e264642259e8c74708dd4a72ba Mon Sep 17 00:00:00 2001
> > From: Andreas Cadhalpun 
> > Date: Wed, 3 Feb 2016 01:01:34 +0100
> > Subject: [PATCH] lavf: forward protocol_whitelist for the remaining cases
> > 
> > Also set a default_whitelist for mmsh and ffrtmphttp.
> > 
> > Signed-off-by: Andreas Cadhalpun 
> 
> LGTM

seems this was forgotten
applied

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf: forward protocol_whitelist for the remaining cases

2016-02-27 Thread Michael Niedermayer
On Wed, Feb 03, 2016 at 11:20:05PM +0100, Andreas Cadhalpun wrote:
> On 03.02.2016 03:41, Michael Niedermayer wrote:
> > On Wed, Feb 03, 2016 at 01:51:55AM +0100, Andreas Cadhalpun wrote:
> >> @@ -274,4 +282,5 @@ URLProtocol ff_ffrtmphttp_protocol = {
> >>  .priv_data_size = sizeof(RTMP_HTTPContext),
> >>  .flags  = URL_PROTOCOL_FLAG_NETWORK,
> >>  .priv_data_class= _class,
> >> +.default_whitelist = "https,http,tcp",
> > 
> > if it needs https it might need tls too
> 
> Yes, updated patch attached.
> 
> Best regards,
> Andreas
> 

>  mmsh.c |9 +
>  rtmphttp.c |9 +
>  rtsp.c |8 
>  3 files changed, 26 insertions(+)
> ac9de87a225e549ae03722a3fc487cb22be5802a  
> 0001-lavf-forward-protocol_whitelist-for-the-remaining-ca.patch
> From 595133afad21a4e264642259e8c74708dd4a72ba Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun 
> Date: Wed, 3 Feb 2016 01:01:34 +0100
> Subject: [PATCH] lavf: forward protocol_whitelist for the remaining cases
> 
> Also set a default_whitelist for mmsh and ffrtmphttp.
> 
> Signed-off-by: Andreas Cadhalpun 

LGTM

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf: forward protocol_whitelist for the remaining cases

2016-02-03 Thread Andreas Cadhalpun
On 03.02.2016 03:41, Michael Niedermayer wrote:
> On Wed, Feb 03, 2016 at 01:51:55AM +0100, Andreas Cadhalpun wrote:
>> @@ -274,4 +282,5 @@ URLProtocol ff_ffrtmphttp_protocol = {
>>  .priv_data_size = sizeof(RTMP_HTTPContext),
>>  .flags  = URL_PROTOCOL_FLAG_NETWORK,
>>  .priv_data_class= _class,
>> +.default_whitelist = "https,http,tcp",
> 
> if it needs https it might need tls too

Yes, updated patch attached.

Best regards,
Andreas

>From 595133afad21a4e264642259e8c74708dd4a72ba Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun 
Date: Wed, 3 Feb 2016 01:01:34 +0100
Subject: [PATCH] lavf: forward protocol_whitelist for the remaining cases

Also set a default_whitelist for mmsh and ffrtmphttp.

Signed-off-by: Andreas Cadhalpun 
---
 libavformat/mmsh.c | 9 +
 libavformat/rtmphttp.c | 9 +
 libavformat/rtsp.c | 8 
 3 files changed, 26 insertions(+)

diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index 16f07fe..d992337 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -246,6 +246,14 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
  host, port, mmsh->request_seq++);
 av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);
 
+if (!mms->mms_hd->protocol_whitelist && h->protocol_whitelist) {
+mms->mms_hd->protocol_whitelist = av_strdup(h->protocol_whitelist);
+if (!mms->mms_hd->protocol_whitelist) {
+err = AVERROR(ENOMEM);
+goto fail;
+}
+}
+
 err = ffurl_connect(mms->mms_hd, NULL);
 if (err) {
 goto fail;
@@ -410,4 +418,5 @@ URLProtocol ff_mmsh_protocol = {
 .url_read_seek  = mmsh_read_seek,
 .priv_data_size = sizeof(MMSHContext),
 .flags  = URL_PROTOCOL_FLAG_NETWORK,
+.default_whitelist = "http,tcp",
 };
diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
index 8ed5eb1..67e81cc 100644
--- a/libavformat/rtmphttp.c
+++ b/libavformat/rtmphttp.c
@@ -220,6 +220,14 @@ static int rtmp_http_open(URLContext *h, const char *uri, int flags)
 av_opt_set(rt->stream->priv_data, "multiple_requests", "1", 0);
 av_opt_set_bin(rt->stream->priv_data, "post_data", "", 1, 0);
 
+if (!rt->stream->protocol_whitelist && h->protocol_whitelist) {
+rt->stream->protocol_whitelist = av_strdup(h->protocol_whitelist);
+if (!rt->stream->protocol_whitelist) {
+ret = AVERROR(ENOMEM);
+goto fail;
+}
+}
+
 /* open the http context */
 if ((ret = ffurl_connect(rt->stream, NULL)) < 0)
 goto fail;
@@ -274,4 +282,5 @@ URLProtocol ff_ffrtmphttp_protocol = {
 .priv_data_size = sizeof(RTMP_HTTPContext),
 .flags  = URL_PROTOCOL_FLAG_NETWORK,
 .priv_data_class= _class,
+.default_whitelist = "https,http,tcp,tls",
 };
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d710469..24a1e2b 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1746,6 +1746,14 @@ redirect:
  sessioncookie);
 av_opt_set(rt->rtsp_hd->priv_data, "headers", headers, 0);
 
+if (!rt->rtsp_hd->protocol_whitelist && s->protocol_whitelist) {
+rt->rtsp_hd->protocol_whitelist = av_strdup(s->protocol_whitelist);
+if (!rt->rtsp_hd->protocol_whitelist) {
+err = AVERROR(ENOMEM);
+goto fail;
+}
+}
+
 /* complete the connection */
 if (ffurl_connect(rt->rtsp_hd, NULL)) {
 err = AVERROR(EIO);
-- 
2.7.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf: forward protocol_whitelist for the remaining cases

2016-02-02 Thread Michael Niedermayer
On Wed, Feb 03, 2016 at 01:51:55AM +0100, Andreas Cadhalpun wrote:
> Also set a default_whitelist for mmsh and ffrtmphttp.
> 
> Signed-off-by: Andreas Cadhalpun 
> ---
>  libavformat/mmsh.c | 9 +
>  libavformat/rtmphttp.c | 9 +
>  libavformat/rtsp.c | 8 
>  3 files changed, 26 insertions(+)
> 
> diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
> index 16f07fe..d992337 100644
> --- a/libavformat/mmsh.c
> +++ b/libavformat/mmsh.c
> @@ -246,6 +246,14 @@ static int mmsh_open_internal(URLContext *h, const char 
> *uri, int flags, int tim
>   host, port, mmsh->request_seq++);
>  av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);
>  
> +if (!mms->mms_hd->protocol_whitelist && h->protocol_whitelist) {
> +mms->mms_hd->protocol_whitelist = av_strdup(h->protocol_whitelist);
> +if (!mms->mms_hd->protocol_whitelist) {
> +err = AVERROR(ENOMEM);
> +goto fail;
> +}
> +}
> +
>  err = ffurl_connect(mms->mms_hd, NULL);
>  if (err) {
>  goto fail;
> @@ -410,4 +418,5 @@ URLProtocol ff_mmsh_protocol = {
>  .url_read_seek  = mmsh_read_seek,
>  .priv_data_size = sizeof(MMSHContext),
>  .flags  = URL_PROTOCOL_FLAG_NETWORK,
> +.default_whitelist = "http,tcp",
>  };
> diff --git a/libavformat/rtmphttp.c b/libavformat/rtmphttp.c
> index 8ed5eb1..c8a15e3 100644
> --- a/libavformat/rtmphttp.c
> +++ b/libavformat/rtmphttp.c
> @@ -220,6 +220,14 @@ static int rtmp_http_open(URLContext *h, const char 
> *uri, int flags)
>  av_opt_set(rt->stream->priv_data, "multiple_requests", "1", 0);
>  av_opt_set_bin(rt->stream->priv_data, "post_data", "", 1, 0);
>  
> +if (!rt->stream->protocol_whitelist && h->protocol_whitelist) {
> +rt->stream->protocol_whitelist = av_strdup(h->protocol_whitelist);
> +if (!rt->stream->protocol_whitelist) {
> +ret = AVERROR(ENOMEM);
> +goto fail;
> +}
> +}
> +
>  /* open the http context */
>  if ((ret = ffurl_connect(rt->stream, NULL)) < 0)
>  goto fail;
> @@ -274,4 +282,5 @@ URLProtocol ff_ffrtmphttp_protocol = {
>  .priv_data_size = sizeof(RTMP_HTTPContext),
>  .flags  = URL_PROTOCOL_FLAG_NETWORK,
>  .priv_data_class= _class,
> +.default_whitelist = "https,http,tcp",

if it needs https it might need tls too


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel