windytan / redsea

Command-line FM-RDS decoder with JSON output.
MIT License
406 stars 38 forks source link

RT+ tags contain expired RadioText #23

Closed windytan closed 8 years ago

windytan commented 8 years ago

Occasionally, for a short time, a RT+ tag may contain parts of RadioText it should not apply to, because the change in RadioText was not synchronized with the change in RT+ field lengths.

This appears to be caused at the transmitter; a RT+ tag is transmitted while still transmitting the old RadioText. An example from NDR 2:

                    |         |
D382 2153 6E64 722E | 2A  RT  | "NDR 2   www.ndr.de/ndr2 "
                    |         |              ^^^^
D382 3158 0000 4BD7 | 3A  ODA | 12A = RadioText+
                    |         |
D382 2154 6465 2F6E | 2A  RT  | "NDR 2   www.ndr.de/ndr2 "
                    |         |                  ^^^^
D382 2155 6472 320D | 2A  RT  | "NDR 2   www.ndr.de/ndr2 "
                    |         |                      ^^^^
D382 C148 201C 2244 | 12A RT+ | item.title:"NDR 2   www.ndr"
                    |         | item.artist:"/ndr2 "
D382 2150 4E44 5220 | 2A  RT  | "NDR 2   www.ndr.de/ndr2 "
                    |         |  ^^^^
D382 C148 201C 2244 | 12A RT+ | item.title:"NDR 2   www.ndr"
                    |         | item.artist:"/ndr2 "
D382 2151 3220 2020 | 2A  RT  | "NDR 2   www.ndr.de/ndr2 "
                    |         |      ^^^^

RT+ is handled by parseRadioTextPlus().

A workaround would be to, for example, ignore RT+ tags that end or start with whitespace. But this could possibly lead to legit RT+ being ignored.

windytan commented 8 years ago

Mostly fixed in c2789a0 but this still appears with certain stations. A WONTFIX for now.