Opened 17 years ago
Closed 17 years ago
#768 closed defect (fixed)
SMIL playlist loading bug
Reported by: | 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)
Change History (5)
comment:1 by , 17 years ago
Cc: | added |
---|---|
Status: | new → assigned |
comment:2 by , 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.
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
fixed, applied your first fix
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?