[libav-devel] [PATCH] rtmpproto: Include the full path as app when "slist=" is found

Martin Storsjö martin at martin.st
Wed Nov 11 21:47:37 CET 2015


This matches what librtmp does. This fixes automatic url parsing of
crunchyroll urls.

---

This changes how such urls are parsed, I've contacted Uwe
who contributed this part in 7ce3bd961 to see whether this
change is ok for him or if it breaks things in his case.
---
 libavformat/rtmpproto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 77a801d..4ed8108 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2674,8 +2674,8 @@ reconnect:
     qmark = strchr(path, '?');
     if (qmark && strstr(qmark, "slist=")) {
         char* amp;
-        // After slist we have the playpath, before the params, the app
-        av_strlcpy(rt->app, path + 1, FFMIN(qmark - path, APP_MAX_LENGTH));
+        // After slist we have the playpath, the full path is used as app
+        av_strlcpy(rt->app, path + 1, APP_MAX_LENGTH);
         fname = strstr(path, "slist=") + 6;
         // Strip any further query parameters from fname
         amp = strchr(fname, '&');
-- 
2.4.9 (Apple Git-60)



More information about the libav-devel mailing list