On 16-02-16 at 17:27, Derek Buitenhuis wrote: > ffmpeg | branch: master | Derek Buitenhuis <derek.buitenh...@gmail.com> | Tue > Feb 16 16:26:49 2016 +0000| [d0fc5de3a643fe7f974ed14e410c2ac2f4147d7e] | > committer: Derek Buitenhuis > > Merge commit '81306fd4bdeb5c17d4db771e4fec684773b5790f' > > * commit '81306fd4bdeb5c17d4db771e4fec684773b5790f': > hls: eliminate ffurl_* usage > > Merged-by: Derek Buitenhuis <derek.buitenh...@gmail.com> > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0fc5de3a643fe7f974ed14e410c2ac2f4147d7e > --- At least this change in hls.c seems to be incorrect, it breaks setting the user-agent option for hls. Initially the correct user agent is used when querying the hls, but when refreshing the playlist the user agent is reset to Lavf/57.25.100. Reverting this specific hunk seems to fix the issue. I assume the other changed call to update_options in open_url is also broken, but didn't test.
diff --git a/libavformat/hls.c b/libavformat/hls.c index fc1ff38..762e140 100644 (file) --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1513,7 +1486,7 @@ static int save_avio_options(AVFormatContext *s) static int hls_read_header(AVFormatContext *s) { - URLContext *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque; + void *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque; HLSContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0; @@ -1525,19 +1498,18 @@ static int hls_read_header(AVFormatContext *s) c->first_timestamp = AV_NOPTS_VALUE; c->cur_timestamp = AV_NOPTS_VALUE; - // if the URL context is good, read important options we must broker later - if (u && u->prot->priv_data_class) { + if (u) { // get the previous user agent & set back to null if string size is zero - update_options(&c->user_agent, "user-agent", u->priv_data); + update_options(&c->user_agent, "user-agent", u); // get the previous cookies & set back to null if string size is zero - update_options(&c->cookies, "cookies", u->priv_data); + update_options(&c->cookies, "cookies", u); // get the previous headers & set back to null if string size is zero - update_options(&c->headers, "headers", u->priv_data); + update_options(&c->headers, "headers", u); // get the previous http proxt & set back to null if string size is zero - update_options(&c->http_proxy, "http_proxy", u->priv_data); + update_options(&c->http_proxy, "http_proxy", u); } -- Simon Thelen _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog