libsdl-mixer: fix seek bug for good
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 16 Apr 2013 19:55:13 +0000 (22:55 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 16 Apr 2013 19:55:13 +0000 (22:55 +0300)
recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch [new file with mode: 0644]
recipes/libsdl/libsdl-mixer_1.2.12.bb

diff --git a/recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch b/recipes/libsdl/libsdl-mixer/fix_ogg_tremor_seek.hg.patch
new file mode 100644 (file)
index 0000000..af8f2ff
--- /dev/null
@@ -0,0 +1,21 @@
+# HG changeset patch
+# User Grazvydas Ignotas <notasas@gmail.com>
+# Date 1366130283 -10800
+# Node ID 73fc977440fec551b070a9d235334f809ad196f1
+# Parent  05d12cea02531a39ef38d5432cb5de873d8df0af
+Fix ogg seek when tremor is used
+
+ov_time_seek takes milliseconds, not seconds.
+
+diff -r 05d12cea0253 -r 73fc977440fe music_ogg.c
+--- a/music_ogg.c      Tue Feb 26 16:53:06 2013 -0800
++++ b/music_ogg.c      Tue Apr 16 19:38:03 2013 +0300
+@@ -225,7 +225,7 @@
+ void OGG_jump_to_time(OGG_music *music, double time)
+ {
+ #ifdef OGG_USE_TREMOR
+-       vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time );
++       vorbis.ov_time_seek( &music->vf, (ogg_int64_t)(time * 1000.0) );
+ #else
+        vorbis.ov_time_seek( &music->vf, time );
+ #endif
index 8fecd83..414b95a 100644 (file)
@@ -4,8 +4,11 @@ DEPENDS = "virtual/libsdl flac libmikmod libvorbis  ${@base_conditional('ENTERPR
 LICENSE = "zlib"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a37a47a0e579e461474cd03b9e05199d"
 
+PR = "r2"
+
 SRC_URI = "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-${PV}.tar.gz \
            file://configure.patch;patch=1 \
+           file://fix_ogg_tremor_seek.hg.patch;patch=1 \
 "
 
 SRC_URI[md5sum] = "e03ff73d77a55e3572ad0217131dc4a1"