Opened 17 years ago

Closed 17 years ago

#768 closed defect (fixed)

SMIL playlist loading bug

Reported by: sonic_amiga@… Owned by: reimar
Priority: normal Component: core
Version: 1.0rc1 Severity: normal
Keywords: Cc: r_togni@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

SMIL playlists are XML files so they may have normal XML header like:
<?xml charset=...>

Such SMIL files are created by for example Kino nonlinear video editor. MPlayer can't read them because it thinks that <smil> should be the first tag in the file.
MPlayer should skip line beginning with "<xml" during SMIL detection.

Attachments (1)

23Feb2007.smil (951 bytes ) - added by sonic_amiga@… 17 years ago.
A SMIL file created by Kino

Download all attachments as: .zip

Change History (5)

comment:1 by r_togni@…, 17 years ago

Cc: r_togni@… added
Status: newassigned

Can you provide a sample file?

Is it safe to assume that the xml tag is in the first line and the smil tag is on the second line? Or it's possible to have other lines between the xml tag and the smil tag?

comment:2 by sonic_amiga@…, 17 years ago

I think it's safe to assume that <smil> follows <?xml>. At least my files follow this rule.
I've modified my mplayer (playtreeparser.c) in this manner:
--- cut ---

Check if smil
while((line = play_tree_parser_get_line(p)) != NULL) {

strstrip(line);
if(line[0] == '\0') Ignore empties

continue;

if (strncasecmp(line,"<?xml",5)==0)

continue;

if (strncasecmp(line,"<smil",5)==0
strncasecmp(line,"<?wpl",5)==0)

break; smil header found

else

return NULL; line not smil exit

}

--- cut ---
This works okay. I'll bring the sample file tomorrow.
If you're unsure you may introduce another algorythm like this one:
--- cut ---

Check if smil
while((line = play_tree_parser_get_line(p)) != NULL) {

strstrip(line);

if (strncasecmp(line,"<smil",5)==0
strncasecmp(line,"<?wpl",5)==0)

break; smil header found

}
if (line == NULL)

return NULL; line not smil exit

--- cut ---
This will ignore any possible metadata before "<smil>" tag.

by sonic_amiga@…, 17 years ago

Attachment: 23Feb2007.smil added

A SMIL file created by Kino

comment:3 by sonic_amiga@…, 17 years ago

Here is the sample.

comment:4 by r_togni@…, 17 years ago

Resolution: fixed
Status: assignedclosed

fixed, applied your first fix

Note: See TracTickets for help on using tickets.