Bug 419561

Summary: PATCH: plparser: don't add ASX entries with a duration of 00:00:00 to the playlist
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: totemAssignee: Bastien Nocera <bnocera>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: bnocera
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.20.1-2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-27 01:02:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch: don't add ASX entries with a duration of 00:00:00 to the playlist
none
The same patch for 2.21.3
none
Proposed F-8 patch none

Description Hans de Goede 2007-12-11 11:04:35 UTC
When trying to play this playlist in totem:
http://www.rtl.nl/(channel=rtlnl,progid=rtlnl,zone=rtlgemist.rtl.nl/rtlnl,vm=/experience/rtlnl/,ord=1197369880870)/system/video/wvx/components/shows/idols4/video/miMedia/2007/week49/vr_nathalie_achteraf.avi_plain.xml/1537.wvx

Totem stops at the first entry, the first entry is an asx file whose first entry
is an ENTRYREF, which refers to this file:
<ASX version="3.0">
<ENTRY>
<DURATION VALUE="00:00:00" />
<TITLE />
<AUTHOR>RTL Nederland</AUTHOR>
<REF HREF="http://www.rtl.nl/system/transparant-pixel.gif" />
</ENTRY>
</ASX>

Totem then tries to interpret to transparant-pixel.gif as an asf stream, fails
and stops. This is especially a problem when using the plugin (which is the
normal way to get to these streams) as with the plugin one cannot get to the
playlist to switch to the second entry of the playlist.

I've written the attached patch for this which simply ignores ASX entries with a
duration of 00:00:00, which seems like the right thing todo. I guess this entry
is only there to track the number of views.

Comment 1 Hans de Goede 2007-12-11 11:04:35 UTC
Created attachment 283941 [details]
Patch: don't add ASX entries with a duration of 00:00:00 to the playlist

Comment 2 Hans de Goede 2007-12-11 11:05:15 UTC
Created attachment 283951 [details]
The same patch for 2.21.3

Comment 3 Bastien Nocera 2007-12-11 11:21:28 UTC
No, this should be done in the front-ends, not the parser itself.
The browser plugin already has such code, we'd need that code in the main Totem
itself (see src/totem-playlist.c).

Comment 4 Hans de Goede 2007-12-11 11:40:11 UTC
(In reply to comment #3)
> No, this should be done in the front-ends, not the parser itself.

Hmm, why? Then the wheel needs to get reinvented each time, anyways if you
really want it that way I'll happily adapt my patch to make it so.

> The browser plugin already has such code, we'd need that code in the main Totem
> itself (see src/totem-playlist.c).

Well it doesn't seem to have such code for this case as opening for example:
http://www.rtl.nl/(vm=/service/gemist/home/,id_by_component)/system/video/html/components/reality/rtlprojectcatwalk/miMedia/2007/week50/ma_projectcatwalk_10dec.avi_plain.xml

Where the plugin gets loaded, doesn't work (not even when all the ugly / bad
ffmpeg plugins needed are present), and with my plparser patch it does, or am I
misunderstanding and does src/totem-playlist.c get used by both the plugin and
the player?

Also src/totem-playlist.c is not a small file I've taken a quick look but I
couldn't find an obvious place to add a check for 00:00:00 duration files, which
function should I look at?


Comment 5 Bastien Nocera 2007-12-11 14:13:13 UTC
$ ./test-parser file:///tmp/totem/browser-plugin/1537.wvx 

###################### parsing ################

added URI 'http://www.rtl.nl/system/transparant-pixel.gif'
        duration = '00:00:00'
        author = 'RTL Nederland'
added URI
'mmsh://idols-av.rtl.nl/web/components/shows/idols4/video/2007/week49/vr_nathalie_achteraf.avi.MiMedia_WM_1500K_V9_idols-av_film_an_t4b4l2r2_716x402.wmv?MSWMExt=.asf'

And in browser-plugin/totem-plugin-viewer.c:
       /* Skip short advert streams */
       duration = totem_pl_parser_parse_duration (g_hash_table_lookup (metadata,
"duration"), FALSE);
       if (duration == 0)
              return;

I also noticed that we already ignore 0-length items in playlists in
totem_playlist_entry_parsed() in trunk.

So it's already fixed in rawhide (despite what you put in the version field for
the report). Feel free to add your work-around to F-8 though.

Comment 6 Hans de Goede 2007-12-12 16:16:36 UTC
(In reply to comment #5)
> So it's already fixed in rawhide (despite what you put in the version field for
> the report).

Sorry about that.

> Feel free to add your work-around to F-8 though.
You mean the attached patch for plparser you didn't want upstream? I guess it
would be better then to just add these 2 patches from upstream:
http://svn.gnome.org/viewvc/totem/trunk/browser-plugin/totem-plugin-viewer.c?r1=4838&r2=4866
http://svn.gnome.org/viewvc/totem/trunk/browser-plugin/totem-plugin-viewer.c?r1=4838&r2=4866

(With some adjustments to apply and compile properly)

Shall I add those 2 to F-8, commit build and push to updates-testing?


Comment 7 Hans de Goede 2007-12-12 16:19:37 UTC
Created attachment 285851 [details]
Proposed F-8 patch

Here is a proposed patch for F-8 based on the upstream fix for this.

Comment 8 Bastien Nocera 2007-12-12 16:31:14 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > So it's already fixed in rawhide (despite what you put in the version field for
> > the report).
> 
> Sorry about that.

No worries, happens to me as well.

> > Feel free to add your work-around to F-8 though.
> You mean the attached patch for plparser you didn't want upstream?

> I guess it
> would be better then to just add these 2 patches from upstream:
>
http://svn.gnome.org/viewvc/totem/trunk/browser-plugin/totem-plugin-viewer.c?r1=4838&r2=4866
>
http://svn.gnome.org/viewvc/totem/trunk/browser-plugin/totem-plugin-viewer.c?r1=4838&r2=4866
> 
> (With some adjustments to apply and compile properly)
> 
> Shall I add those 2 to F-8, commit build and push to updates-testing?

Yeah, looks fine actually. Thanks!

I committed that patch to the 2.20 branch, so we can remove it next time I make
a release.

Comment 9 Hans de Goede 2007-12-12 21:11:26 UTC
Patch committed, build and push to updates-testing required.


Comment 10 Fedora Update System 2007-12-13 22:16:47 UTC
totem-2.20.1-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update totem'

Comment 11 Fedora Update System 2007-12-23 22:50:12 UTC
totem-2.20.1-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update totem'

Comment 12 Fedora Update System 2007-12-26 23:50:45 UTC
totem-2.20.1-2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update totem'

Comment 13 Fedora Update System 2007-12-27 01:02:01 UTC
totem-2.20.1-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.