media/liboggplay/fishsound_reset.patch
author Marco Bonardo <mbonardo@mozilla.com>
Fri, 08 Jan 2010 13:57:46 +0100
changeset 36951 765335600809c6fe847897351ea6b6cb17c913da
parent 33256 503880cd5ddbd99e0641794431d597ecedfa17d6
permissions -rw-r--r--
Bug 537271 - Add .pyo files to .hgignore, r=ted

diff --git a/media/liboggplay/src/liboggplay/oggplay_seek.c b/media/liboggplay/src/liboggplay/oggplay_seek.c
--- a/media/liboggplay/src/liboggplay/oggplay_seek.c
+++ b/media/liboggplay/src/liboggplay/oggplay_seek.c
@@ -166,6 +166,20 @@ oggplay_seek_cleanup(OggPlay* me, ogg_in
 
   *p = trash;
   
+  if (milliseconds == 0) {
+    for (i = 0; i < me->num_tracks; i++) {
+      OggPlayDecode *track = me->decode_data[i];
+      FishSound *sound_handle;
+      OggPlayAudioDecode *audio_decode;
+      if (track->content_type != OGGZ_CONTENT_VORBIS) {
+        continue;
+      }
+      audio_decode = (OggPlayAudioDecode*)track;
+      sound_handle = audio_decode->sound_handle;
+      fish_sound_reset(sound_handle);
+    }
+  }
+  
   return E_OGGPLAY_OK;
 }