This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: ir-ctl: fix multiple scancodes in one file
Author:  Sean Young <s...@mess.org>
Date:    Wed Nov 29 17:08:04 2017 +0000

A file with contents:

scancode sony12:0x100015
space 25000
scancode sony12:0x100015

Will produce bogus results.

Reported-by: Matthias Reichl <h...@horus.com>
Tested-by: Matthias Reichl <h...@horus.com>
Signed-off-by: Sean Young <s...@mess.org>

 utils/ir-ctl/ir-ctl.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c3d7ae58a87018b39f0cca9a49c4a7b553135b22
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 544ad3415dd5..8538ec5db5b4 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -230,8 +230,8 @@ static struct file *read_file(const char *fname)
                        char *scancodestr;
 
                        if (!expect_pulse) {
-                               fprintf(stderr, _("error: %s:%d: space must 
precede scancode\n"), fname, lineno);
-                               return NULL;
+                               f->buf[len++] = IR_DEFAULT_TIMEOUT;
+                               expect_pulse = true;
                        }
 
                        scancodestr = strchr(p, ':');
@@ -268,7 +268,8 @@ static struct file *read_file(const char *fname)
                        else
                                f->carrier = carrier;
 
-                       len += protocol_encode(proto, scancode, f->buf);
+                       len += protocol_encode(proto, scancode, f->buf + len);
+                       expect_pulse = false;
                        continue;
                }
 

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to