On Tue, 14 Feb 2012, Diego Biurrun wrote:
On Tue, Feb 14, 2012 at 12:22:18PM +0200, Martin Storsjö wrote:
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -241,11 +241,14 @@ void av_register_all(void)
/* protocols */
+#if FF_API_APPLEHTTP_PROTO
REGISTER_PROTOCOL (APPLEHTTP, applehttp);
+#endif
REGISTER_PROTOCOL (CONCAT, concat);
REGISTER_PROTOCOL (CRYPTO, crypto);
REGISTER_PROTOCOL (FILE, file);
REGISTER_PROTOCOL (GOPHER, gopher);
+ REGISTER_PROTOCOL (HLS, hls);
REGISTER_PROTOCOL (HTTP, http);
This file is missing a version.h #include.
Added. (For the audience, it is already implicitly included by avformat.h,
where it obviously is needed for disabling APIs when they're removed.)
It also misses a config.h #include, btw.
That's a separate cleanup (the rest of this file already is very much
dependent on config.h) so I'm not doing it in this commit.
--- a/libavformat/applehttpproto.c
+++ b/libavformat/hlsproto.c
@@ -197,9 +197,21 @@ static int applehttp_open(URLContext *h, const char *uri,
int flags)
if (av_strstart(uri, "applehttp+", &nested_url)) {
av_strlcpy(s->playlisturl, nested_url, sizeof(s->playlisturl));
+ av_log(h, AV_LOG_WARNING, "The applehttp protocol is deprecated, "
+ "use hls+%s as url instead.\n", nested_url);
+ } else if (av_strstart(uri, "hls+", &nested_url)) {
+ av_strlcpy(s->playlisturl, nested_url, sizeof(s->playlisturl));
} else if (av_strstart(uri, "applehttp://", &nested_url)) {
av_strlcpy(s->playlisturl, "http://", sizeof(s->playlisturl));
av_strlcat(s->playlisturl, nested_url, sizeof(s->playlisturl));
+ av_log(h, AV_LOG_WARNING, "The applehttp protocol is deprecated, "
+ "use hls+http://%s as url instead.\n",
+ nested_url);
+ } else if (av_strstart(uri, "hls://", &nested_url)) {
+ av_log(h, AV_LOG_ERROR, "No nested protocol specified. Specify e.g. "
+ "hls+http://%s\n", nested_url);
I would suggest breaking the lines before the text, it should be possible
to keep it on one line then.
They don't really fit then either, but perhaps it's nicer that way anyway.
@@ -303,6 +315,7 @@ retry:
+#if FF_API_APPLEHTTP_PROTO
URLProtocol ff_applehttp_protocol = {
.name = "applehttp",
.url_open = applehttp_open,
You miss a version.h #include.
Added.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel