]> git.sesse.net Git - ffmpeg/commitdiff
http: do not print a warning message for expired cookies
authorwm4 <nfxjfg@googlemail.com>
Thu, 8 Mar 2018 03:30:35 +0000 (04:30 +0100)
committerwm4 <nfxjfg@googlemail.com>
Sun, 18 Mar 2018 11:36:24 +0000 (12:36 +0100)
libavformat prints a warning that the cookie couldn't be parsed (see
callers of parse_cookie()). This is obviously not true - it could be
parsed, but was simply ignored. Don't return an error to avoid the
warning.

libavformat/http.c

index 344fd603cb9b08cbf2a319e7fbf5b97401c2fc2b..d7a72e7129728798fa7b91074e88aceaf7af1429 100644 (file)
@@ -802,7 +802,7 @@ static int parse_cookie(HTTPContext *s, const char *p, AVDictionary **cookies)
             // if the cookie has already expired ignore it
             if (av_timegm(&new_tm) < av_gettime() / 1000000) {
                 av_dict_free(&new_params);
-                return -1;
+                return 0;
             }
 
             // only replace an older cookie with the same name