]> git.sesse.net Git - ffmpeg/commitdiff
rtmpproto: Ignore errors from the getStreamLength method
authorMartin Storsjö <martin@martin.st>
Tue, 4 Nov 2014 07:23:35 +0000 (09:23 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 5 Nov 2014 07:18:22 +0000 (09:18 +0200)
It is never an error if this method failed. If rt->live was
explicitly set to 0 (known to be a recorded file), print it
as a warning, otherwise print it as a debug message.

Based on a patch by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index 5ff661a465f6f9267541ef6ebd67a11528033c69..9511946fc120a7e0e7bb957566af910c3935b53b 100644 (file)
@@ -1816,6 +1816,9 @@ static int handle_invoke_error(URLContext *s, RTMPPacket *pkt)
             /* Gracefully ignore Adobe-specific historical artifact errors. */
             level = AV_LOG_WARNING;
             ret = 0;
+        } else if (tracked_method && !strcmp(tracked_method, "getStreamLength")) {
+            level = rt->live ? AV_LOG_DEBUG : AV_LOG_WARNING;
+            ret = 0;
         } else if (tracked_method && !strcmp(tracked_method, "connect")) {
             ret = handle_connect_error(s, tmpstr);
             if (!ret) {