ref: c6ee10356946d9bc7b34974cc737acec166f0e6b
parent: 0ce01d66fb72ea51b7dd0e885a01e2bba1eda7ff
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Jul 28 10:33:31 EDT 2021
parse server/client bw
--- a/rtmp.c
+++ b/rtmp.c
@@ -88,6 +88,9 @@
int mode;
int bsz;
int i;
+ int svbw;
+ int clbw;
+ u8int clbw2;
struct {
int n;
Invoke *w;
@@ -546,7 +549,15 @@
break;
case PktServerBW:
+ if((s = amfi32get(s, e, &r->svbw)) == nil)
+ goto err;
+ break;
+
case PktClientBW:
+ if((s = amfi32get(s, e, &r->clbw)) == nil || (s = amfbyteget(s, e, &r->clbw2)) == nil)
+ goto err;
+ break;
+
case PktAudio:
case PktVideo:
case PktFlexStreamSend: