Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 285851 Details for
Bug 419561
PATCH: plparser: don't add ASX entries with a duration of 00:00:00 to the playlist
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed F-8 patch
totem-2.20.1-ignore-0-duration-pl-entries.patch (text/plain), 2.84 KB, created by
Hans de Goede
on 2007-12-12 16:19:37 UTC
(
hide
)
Description:
Proposed F-8 patch
Filename:
MIME Type:
Creator:
Hans de Goede
Created:
2007-12-12 16:19:37 UTC
Size:
2.84 KB
patch
obsolete
>diff -ur totem-2.20.1/browser-plugin/totem-plugin-viewer.c new/browser-plugin/totem-plugin-viewer.c >--- totem-2.20.1/browser-plugin/totem-plugin-viewer.c 2007-10-17 15:07:53.000000000 +0200 >+++ new/browser-plugin/totem-plugin-viewer.c 2007-12-12 17:09:02.000000000 +0100 >@@ -1990,6 +1990,7 @@ > { > TotemEmbedded *emb = (TotemEmbedded *) data; > TotemPlItem *item; >+ int duration; > > if (g_str_has_prefix (uri, "file://") != FALSE > && g_str_has_prefix (emb->base_uri, "file://") == FALSE) { >@@ -2000,9 +2001,14 @@ > g_print ("added URI '%s'\n", uri); > g_hash_table_foreach (metadata, (GHFunc) entry_metadata_foreach, NULL); > >+ /* Skip short advert streams */ >+ duration = totem_embedded_parse_duration (g_hash_table_lookup (metadata, "duration")); >+ if (duration == 0) >+ return; >+ > item = g_new0 (TotemPlItem, 1); > item->uri = g_strdup (uri); >- item->duration = totem_embedded_parse_duration (g_hash_table_lookup (metadata, "duration")); >+ item->duration = duration; > item->starttime = totem_embedded_parse_duration (g_hash_table_lookup (metadata, "starttime")); > > emb->playlist = g_list_prepend (emb->playlist, item); >diff -ur totem-2.20.1/src/totem-playlist.c new/src/totem-playlist.c >--- totem-2.20.1/src/totem-playlist.c 2007-10-05 16:17:22.000000000 +0200 >+++ new/src/totem-playlist.c 2007-12-12 17:09:23.000000000 +0100 >@@ -1436,6 +1436,39 @@ > GCONF_PREFIX"/shuffle", NULL) != FALSE; > } > >+/* FIXME this should live in the playlist parser */ >+static int >+totem_embedded_parse_duration (const char *duration) >+{ >+ int hours, minutes, seconds, fractions; >+ >+ if (!duration) >+ return -1; >+ >+ /* Formats used by both ASX and RAM files */ >+ if (sscanf (duration, "%d:%d:%d.%d", &hours, &minutes, &seconds, &fractions) == 4) { >+ int ret = hours * 3600 + minutes * 60 + seconds; >+ if (ret == 0 && fractions > 0) >+ ret = 1; >+ return ret; >+ } >+ if (sscanf (duration, "%d:%d:%d", &hours, &minutes, &seconds) == 3) >+ return hours * 3600 + minutes * 60 + seconds; >+ if (sscanf (duration, "%d:%d.%d", &minutes, &seconds, &fractions) == 3) { >+ int ret = minutes * 60 + seconds; >+ if (ret == 0 && fractions > 0) >+ ret = 1; >+ return ret; >+ } >+ if (sscanf (duration, "%d:%d", &minutes, &seconds) == 2) >+ return minutes * 60 + seconds; >+ /* PLS files format */ >+ if (sscanf (duration, "%d", &seconds) == 1) >+ return seconds; >+ >+ return -1; >+} >+ > static void > totem_playlist_entry_parsed (TotemPlParser *parser, > const char *uri, >@@ -1443,7 +1476,13 @@ > TotemPlaylist *playlist) > { > const char *title; >+ gint64 duration; > >+ /* We ignore 0-length items in playlists, they're usually just banners */ >+ duration = totem_embedded_parse_duration >+ (g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_DURATION)); >+ if (duration == 0) >+ return; > title = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_TITLE); > totem_playlist_add_one_mrl (playlist, uri, title); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 419561
:
283941
|
283951
| 285851