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 649780 - flac: seek beyond end fails instead of EOSing immediately
flac: seek beyond end fails instead of EOSing immediately
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-09 11:28 UTC by webber
Modified: 2011-06-15 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flacdec: Send EOS when seeking after the end of file instead of failing (4.03 KB, patch)
2011-05-11 08:25 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description webber 2011-05-09 11:28:30 UTC
my code : gst_element_seek_simple (play, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, pos);

If the pos params exceed the duration of flac files, gst_element_seek_simple will return false, and seek will be failure. It should be equivalent to seek to the end, right?

I have tested several audio format, including mp3, mp4, wav, wma, ogg and flac. Only flac has this problem.

Thanks!
Comment 1 Sebastian Dröge (slomo) 2011-05-11 08:03:51 UTC
What's the pipeline you use? If you're using playbin2/playbin, is flacparse used?
Comment 2 webber 2011-05-11 08:08:54 UTC
I'm using the playbin2, and have installed libgstflac.so , is flacparse included in the so?
Comment 3 webber 2011-05-11 08:10:35 UTC
I find flacparse in gst-plugin-bad, I will try
Comment 4 Sebastian Dröge (slomo) 2011-05-11 08:17:19 UTC
Ok, I see why it would fail with only flacdec. I'll prepare a patch but please retest with flacparse
Comment 5 webber 2011-05-11 08:20:09 UTC
please could you tell me which plug-in should be enabled to make flacparse, I want to test it as quickly as possible
Comment 6 Sebastian Dröge (slomo) 2011-05-11 08:25:48 UTC
Created attachment 187611 [details] [review]
flacdec: Send EOS when seeking after the end of file instead of failing

Fixes bug #649780.
Comment 7 Sebastian Dröge (slomo) 2011-05-11 08:26:44 UTC
gst-plugins-bad (older releases) or gst-plugins-good (newest release).

Could you also test the attached patch (without flacparse), it should fix the bug but I didn't test it yet ;)
Comment 8 webber 2011-05-11 08:34:56 UTC
I have installed flacdec by --enable-flac in gst-plugins-good-0.10.28, is it enough?

wait a moment, I will try to test the patch
Comment 9 webber 2011-05-12 00:41:58 UTC
Yeah, That's OK! Thanks!
Comment 10 webber 2011-05-12 02:22:41 UTC
Both two methods can resolve this porblem.
Comment 11 Sebastian Dröge (slomo) 2011-05-12 07:56:48 UTC
Ok, thanks. I'll push this patch soon.
Comment 12 Sebastian Dröge (slomo) 2011-05-14 10:05:16 UTC
commit d4b9cbc1ae6abdffe2ff2309e10eafe94b090982
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Wed May 11 10:25:15 2011 +0200

    flacdec: Send EOS when seeking after the end of file instead of failing
    
    Fixes bug #649780.