shithub: rtmp

Download patch

ref: af0838b8929fb0168353e434eb2b21e8b1ccc9ad
parent: 1b64b3b2c2655063d8fb5aa2736316387a549d93
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Aug 21 18:17:55 EDT 2021

adts: fix size parsing

--- a/adts.c
+++ b/adts.c
@@ -37,7 +37,7 @@
 		goto err;
 	}
 
-	f->sz = h[4]<<3 | h[5]>>5;
+	f->sz = (h[3]&3)<<11 | h[4]<<3 | h[5]>>5;
 	if(f->sz < 7){
 		werrstr("frame too small (%d bytes)", f->sz);
 		goto err;