Re: [FFmpeg-devel] [PATCH] avformat/hls: don't propagate deprecated "user-agent" AVOption
On Sun, 29 Apr 2018 14:23:17 +0200 Clément Bœsch wrote: > On Sat, Apr 28, 2018 at 08:37:06PM +0200, wm4 wrote: > > This code will print a warning if any user agent is set - even if the > > API user used the proper non-deprecated "user_agent" option. > > > > This change should not even break anything, because even if the user > > sets the deprecated "user-agent" option, http.c copies it to the > > "user_agent" option anyway. > > --- > > libavformat/hls.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > index ffec124818..4ee4be769d 100644 > > --- a/libavformat/hls.c > > +++ b/libavformat/hls.c > > @@ -1593,7 +1593,7 @@ static int save_avio_options(AVFormatContext *s) > > { > > HLSContext *c = s->priv_data; > > static const char * const opts[] = { > > -"headers", "http_proxy", "user_agent", "user-agent", "cookies", > > "referer", "rw_timeout", NULL }; > > +"headers", "http_proxy", "user_agent", "cookies", "referer", > > "rw_timeout", NULL }; > > const char * const * opt = opts; > > uint8_t *buf; > > int ret = 0; > > Should be fine, thanks. > Pushed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/hls: don't propagate deprecated "user-agent" AVOption
On Sat, Apr 28, 2018 at 08:37:06PM +0200, wm4 wrote: > This code will print a warning if any user agent is set - even if the > API user used the proper non-deprecated "user_agent" option. > > This change should not even break anything, because even if the user > sets the deprecated "user-agent" option, http.c copies it to the > "user_agent" option anyway. > --- > libavformat/hls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index ffec124818..4ee4be769d 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -1593,7 +1593,7 @@ static int save_avio_options(AVFormatContext *s) > { > HLSContext *c = s->priv_data; > static const char * const opts[] = { > -"headers", "http_proxy", "user_agent", "user-agent", "cookies", > "referer", "rw_timeout", NULL }; > +"headers", "http_proxy", "user_agent", "cookies", "referer", > "rw_timeout", NULL }; > const char * const * opt = opts; > uint8_t *buf; > int ret = 0; Should be fine, thanks. -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/hls: don't propagate deprecated "user-agent" AVOption
This code will print a warning if any user agent is set - even if the API user used the proper non-deprecated "user_agent" option. This change should not even break anything, because even if the user sets the deprecated "user-agent" option, http.c copies it to the "user_agent" option anyway. --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index ffec124818..4ee4be769d 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1593,7 +1593,7 @@ static int save_avio_options(AVFormatContext *s) { HLSContext *c = s->priv_data; static const char * const opts[] = { -"headers", "http_proxy", "user_agent", "user-agent", "cookies", "referer", "rw_timeout", NULL }; +"headers", "http_proxy", "user_agent", "cookies", "referer", "rw_timeout", NULL }; const char * const * opt = opts; uint8_t *buf; int ret = 0; -- 2.16.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel