After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668289 - regression: playbin2: repeat mode only repeats twice in totem
regression: playbin2: repeat mode only repeats twice in totem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-19 17:15 UTC by Sven Arvidsson
Modified: 2012-02-03 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bin: reset the EOS detection machinery after sending an EOS message (1.31 KB, patch)
2012-02-02 17:20 UTC, Vincent Penquerc'h
committed Details | Review

Description Sven Arvidsson 2012-01-19 17:15:13 UTC
The repeat mode in Totem only repeats playback twice, after that it seems to get stuck, though it still shows "Playing" in the statusbar. 

This seems to happen regardless of the file format of the video.

I'm using version 3.2.1
Comment 1 Dave Lentz 2012-01-21 10:54:46 UTC
Confirming
https://bugs.launchpad.net/ubuntu/+source/totem/+bug/918077
Comment 2 Sven Arvidsson 2012-01-23 21:53:09 UTC
The Launchpad bug also mentions that this problem only occurs if you're trying to loop a single file. If you loop two or more files in a playlist it works as intended.
Comment 3 Sven Arvidsson 2012-01-24 15:36:13 UTC
I could very well be wrong, but it looks like Totem doesn't get an EOS after the seek to beginning, so it only enters on_eos_event once. If that's the case I guess it's a bug in GStreamer?

It could be worked around by pausing before the seek, but I doubt that's the correct way to fix this.
Comment 4 Sven Arvidsson 2012-01-24 19:23:19 UTC
Downgrading GStreamer from 0.10.35.2 to 0.10.35 also solves this, so I guess it really is a GStreamer bug.
Comment 5 Tim-Philipp Müller 2012-02-01 22:58:34 UTC
Let's mark it as blocker and move to -base for now then.
Comment 6 Vincent Penquerc'h 2012-02-02 15:33:25 UTC
When you say "Downgrading GStreamer from 0.10.35.2 to 0.10.35", was this the gstreamer core, or the -base plugins, or both ?
I'm having a lot of trouble trying to bisect here due to various API changes, and knowing this would help a lot.
Comment 7 Sven Arvidsson 2012-02-02 16:04:56 UTC
It was both.
Comment 8 Vincent Penquerc'h 2012-02-02 16:17:51 UTC
Thanks.

I just got lucky and found the culprit by reverting what seemed like good candidates:

commit 4a836cae9fa9240d7ed3c6e5a9d7ea9afa484c0a
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Apr 18 14:26:33 2011 +0200

    bin: Only post EOS messages after reaching the PLAYING state
    
    Fixes bug #647756.
Comment 9 Vincent Penquerc'h 2012-02-02 17:20:23 UTC
Created attachment 206651 [details] [review]
bin: reset the EOS detection machinery after sending an EOS message

This will allow detecting further EOS, for instance after looping
a stream without changing states.
Comment 10 Vincent Penquerc'h 2012-02-02 17:22:43 UTC
This solves the issue of looping only once.

I'm not certain it keeps the original issue fixed, as I cannot reproduce the original issue from instructions in 647756. I think it ought to be OK though,
as explained in the comment in this patch.
Comment 11 Sebastian Dröge (slomo) 2012-02-03 08:25:36 UTC
Not 100% sure if this is correct but I can't think of a case where this breaks. Usually the EOS "state" is only left when you receive a new NEWSEGMENT event after EOS or if the element state changes but doing the first in GstBin is not a good idea... and then all elements inside the bin are supposed to do this correctly already so there should only be new stuff after EOS in GstBin if one of the elements inside the bin has successfully left the EOS "state".


(yes, there's not really an EOS state :P )
Comment 12 Vincent Penquerc'h 2012-02-03 10:59:48 UTC
I'm... not sure I understand that :)
I first tried to reset the EOS flag when receiving a seek event, but that did not fix the issue (I did not understand why the timing of this was wrong). Maybe setting upon receiving a segment event would work too, if that's what you're saying ?
Comment 13 Vincent Penquerc'h 2012-02-03 11:27:18 UTC
Talked with slomo, he's OK with the patch; pushed:

commit ec7a7c318ac33fe76ad88fde7b9b64913ab23c57
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Feb 2 17:18:22 2012 +0000

    bin: reset the EOS detection machinery after sending an EOS message
    
    This will allow detecting further EOS, for instance after looping
    a stream without changing states.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668289