Josh Allmann | 17 Aug 2012 23:12
Picon
Gravatar

[PATCH] rtmp: Ignore releaseStream errors.

crtmpserver returns an error when releasing a
new or nonexistent stream, but that isn't fatal.
---
 libavformat/rtmpproto.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6205cd2..332a2af 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
 <at>  <at>  -549,7 +549,7  <at>  <at>  static int gen_release_stream(URLContext *s, RTMPContext *rt)
     ff_amf_write_null(&p);
     ff_amf_write_string(&p, rt->playpath);

-    return rtmp_send_packet(rt, &pkt, 0);
+    return rtmp_send_packet(rt, &pkt, 1);
 }

 /**
 <at>  <at>  -1525,8 +1525,8  <at>  <at>  static int handle_invoke_error(URLContext *s, RTMPPacket *pkt)

     if (!ff_amf_get_field_value(pkt->data + 9, data_end,
                                 "description", tmpstr, sizeof(tmpstr))) {
-        if (tracked_method && !strcmp(tracked_method, "_checkbw")) {
-            /* Ignore _checkbw errors. */
+        if (tracked_method && (!strcmp(tracked_method, "_checkbw") || !strcmp(tracked_method,
"releaseStream"))) {
+            /* Ignore these errors. */
             level = AV_LOG_WARNING;
             ret = 0;
(Continue reading)

Martin Storsjö | 17 Aug 2012 23:13

Re: [PATCH] rtmp: Ignore releaseStream errors.

On Fri, 17 Aug 2012, Josh Allmann wrote:

> crtmpserver returns an error when releasing a
> new or nonexistent stream, but that isn't fatal.
> ---
> libavformat/rtmpproto.c |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

We already have a similar patch fixing this and some more, at 
http://patches.libav.org/patch/26144/, awaiting comments from Luca. But 
thanks anyway :-)

// Martin

Gmane