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 741097 - oggdemux: Fix seeking before the first frame.
oggdemux: Fix seeking before the first frame.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-04 04:28 UTC by Mathieu Duponchelle
Modified: 2014-12-05 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
oggdemux: Fix seeking before the first frame. (2.20 KB, patch)
2014-12-04 04:28 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2014-12-04 04:28:14 UTC
The previous code was setting keytarget to target
to make sure the keyframe found for each pad was
indeed before the target.

Then if target == keytarget, it assumed a keyframe had been
found, which was not the case if target was before the first frame
in the file.

This patch checks that a keyframe was indeed found, and if not
seeks to 0, without bisecting again.

Assuming default gst qa assets in $HOME/gst-validate

seek_before_first_frame.scenario:

description, seek=true, handles-states=true
pause, playback-time=0.0
seek, playback-time=0.0, start=0.0, flags=accurate+flush
seek, playback-time=0.0, start=0.01, flags=accurate+flush
seek, playback-time=0.0, start=0.1, flags=accurate+flush

GST_DEBUG=*theoradec*:2 gst-validate-1.0 playbin \
uri=file://$HOME/gst-validate/gst-qa-assets/medias/ogg/vorbis_theora.0.ogg \
--set-scenario seek_before_first_frame.scenario
Comment 1 Mathieu Duponchelle 2014-12-04 04:28:16 UTC
Created attachment 292112 [details] [review]
oggdemux: Fix seeking before the first frame.
Comment 2 Mathieu Duponchelle 2014-12-05 11:08:05 UTC
commit 4e228e0a1f2b01c79378a9d0ba56b58353a5a572
Author: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Date:   Thu Nov 27 05:53:20 2014 +0100

    oggdemux: Fix seeking before the first frame.
    
    The previous code was setting keytarget to target
    to make sure the keyframe found for each pad was
    indeed before the target.
    
    Then if target == keytarget, it assumed a keyframe had been
    found, which was not the case if target was before the first frame
    in the file.
    
    This patch checks that a keyframe was indeed found, and if not
    seeks to 0, without bisecting again.
    
    Assuming default gst qa assets in $HOME/gst-validate
    
    seek_before_first_frame.scenario:
    
    description, seek=true, handles-states=true
    pause, playback-time=0.0
    seek, playback-time=0.0, start=0.0, flags=accurate+flush
    seek, playback-time=0.0, start=0.01, flags=accurate+flush
    seek, playback-time=0.0, start=0.1, flags=accurate+flush
    
    GST_DEBUG=*theoradec*:2 gst-validate-1.0 playbin \
    uri=file://$HOME/gst-validate/gst-qa-assets/medias/ogg/vorbis_theora.0.ogg \
    --set-scenario seek_before_first_frame.scenario
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741097
Comment 3 Mathieu Duponchelle 2014-12-05 11:08:24 UTC
Review of attachment 292112 [details] [review]:

commited