Opened 12 years ago

Closed 12 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: Analyzed by developer:

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@… 12 years ago.
A SMIL file created by Kino

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by r_togni@…

  • Cc r_togni@… added
  • Status changed from new to assigned

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 Changed 12 years ago by sonic_amiga@…

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.

Changed 12 years ago by sonic_amiga@…

A SMIL file created by Kino

comment:3 Changed 12 years ago by sonic_amiga@…

Here is the sample.

comment:4 Changed 12 years ago by r_togni@…

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed, applied your first fix

Note: See TracTickets for help on using tickets.