Release 3.01 error, using huge amounts of memory

Ralph Corderoy ralph at
Sun May 7 13:53:02 PDT 2017

Hi Jimmy,

> WARNING: Invalid attributes in HLS playlist:
> BANDWIDTH=979000,CODECS="mp4a.40.5
> (
> 870b8505fd.ism/mobile_wifi_main_sd_abr_v2_hls_master.m3u8?s=1494129167&e=1494172367&h=7c0807ea016ea43f49302dd5004b9e1f)

It's an endless-loop bug in

    # from
    sub parse_m3u_attribs {
	my ($url, $attr_str) = @_;
	my %attr;
	for (my $as = $attr_str; $as ne ''; ) {
	    $as =~ s/^?([^=]*)=([^,"]*|"[^"]*")\s*(,\s*|$)// or
		main::logger "WARNING: Invalid attributes in HLS playlist: $attr_str ($url)\n";   
	    my ($key, $val) = ($1, $2);
	    $val =~ s/^"(.*)"$/$1/;
	    $attr{$key} = $val;
	return %attr;

The code is assuming it will be able to strip off either `foo=bar' or
`foo="xyzzy"' from the front of a comma-separated list.  When it can't, it
prints the warning, and then tries again.  It has no better luck on any future
attempt.  The warning shows what it was toiling over.


I expect this happily consumed `BANDWIDTH=979000', but then disliked the lack
of double-quote termination to `CODECS="mp4a.40.5'.

It needs to be raised with get_iplayer's authors.

Cheers, Ralph.

More information about the get_iplayer mailing list