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 696613 - matroskademux: problem with seeking precision in some files
matroskademux: problem with seeking precision in some files
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.6
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-26 06:43 UTC by steffen.roeber
Modified: 2018-05-12 08:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description steffen.roeber 2013-03-26 06:43:11 UTC
If I play .mkv files in my app, then seeking to a position is not performed 
correctly.
I have an filesrc, decodbin and an appsink.
If I call 
    gst_element_seek(GST_ELEMENT(m_pipeline), 1.0, GST_FORMAT_DEFAULT, 
GST_SEEK_FLAG_FLUSH,
      GST_SEEK_TYPE_SET, qMin(i_stamp, m_duration), GST_SEEK_TYPE_NONE, 
GST_CLOCK_TIME_NONE);


    gst_element_query_position(GST_ELEMENT(m_pipeline), 
GST_FORMAT_DEFAULT, &stamp);

then stamp contains same value as i_stamp, the stamp I want to set. It 
does not matter if I use stamp or frame mode (GST_FORMAT_DEFAULT or 
GST_FORMAT_TIME) behaviour is same in both modes.
The problem is that the next buffer I get in my appsink has a stamp which 
is about 2-3 frames behind the frame or stamp I set. The problem occurs only in some .mkv files.
Comment 1 steffen.roeber 2013-03-26 06:52:32 UTC
the download link:
https://rapidshare.com/files/3623430509/heute%20nacht%20-%20MPEG-1%20mp2.mkv
Comment 2 Edward Hervey 2018-05-12 08:14:16 UTC
You should use GST_SEEK_FLAG_ACCURATE in addition to the flush flag to go to *exactly* where you requested.