shithub: hj264

Download patch

ref: c2dd82f6c805758d4359019b12ac07983ca18fad
parent: 7bdda1ff148fbe5823875ee205a4e3e7868ada2f
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat May 28 12:16:55 EDT 2022

treat a8r8g8b8 as x8r8g8b8

--- a/hj264.c
+++ b/hj264.c
@@ -407,8 +407,8 @@
 	tmp[60] = 0;
 	if(readn(in, tmp, 60) != 60 || tokenize(tmp, f, 5) != 5)
 		sysfatal("invalid image");
-	if(strcmp(f[0], "x8r8g8b8") != 0)
-		sysfatal("only x8r8g8b8 is supported");
+	if(strcmp(f[0]+1, "8r8g8b8") != 0)
+		sysfatal("only [ax]8r8g8b8 is supported");
 	ww = atoi(f[3]) - atoi(f[1]);
 	hh = atoi(f[4]) - atoi(f[2]);