audacious-media-player / audacious

A lightweight and versatile audio player
https://audacious-media-player.org
Other
798 stars 106 forks source link

Handle empty lines in m3u parser #375

Closed Audacious-Bot closed 2 months ago

Audacious-Bot commented 2 months ago

Author Name: Michael Schwendt Original Redmine Issue: https://redmine.audacious-media-player.org/issues/241 Original Date: 2013-01-14


This patch is in reply to: http://redmine.audacious-media-player.org/boards/1/topics/662

??The m3u files at slayradio.org contain extra empty lines, which break Audacious' m3u parser. The parser exits at the first empty line it encounters. As a work-around, a patch like attached works, since it skips empty lines, which should be harmless anyway. The M3U specs don't mention those extra lines, however.??

What do you think?

Audacious-Bot commented 2 months ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2013-01-14T02:40:44Z


Thanks for the patch. It was enough to change the "break" statement to a "goto NEXT" without changing split_line(): https://github.com/audacious-media-player/audacious-plugins/commit/9bb6812fe1b08fef524ae3094d45497e518ff4b7

Audacious-Bot commented 2 months ago

Original Redmine Comment Author Name: Michael Schwendt Original Date: 2013-01-14T11:41:49Z


Yes, that's what the bottom half of the patch did. Changing split_line only avoids that split_line is called for \0.