Bug #241

Handle empty lines in m3u parser

Added by Michael Schwendt almost 2 years ago. Updated almost 2 years ago.

Status:Closed Start date:January 14, 2013
Priority:Minor Due date:
Assignee:- % Done:

100%

Category:plugins/m3u
Target version:3.3.4
Affects version:3.3.3

Description

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-plugins-3.3.3-m3u-empty-lines.patch Magnifier (808 Bytes) Michael Schwendt, January 14, 2013 01:01

Associated revisions

Revision 9bb6812f
Added by John Lindgren almost 2 years ago

m3u: Don't stop parsing at blank lines. Closes: #241.

Revision f9f6269b
Added by John Lindgren over 1 year ago

m3u: Don't stop parsing at blank lines. Closes: #241.

History

#1 Updated by John Lindgren almost 2 years ago

  • Status changed from New to Resolved
  • Target version set to 3.3.4

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

#2 Updated by John Lindgren almost 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

#3 Updated by Michael Schwendt almost 2 years ago

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

Also available in: Atom PDF