mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 516323 - Reset libfishsound when seeking to 0 so it doesn't die re-reading header packets. r=doublec
This commit is contained in:
parent
a495ab4908
commit
5c108df396
@ -130,6 +130,7 @@ _TEST_FILES += \
|
||||
bug504613.ogv \
|
||||
bug504644.ogv \
|
||||
bug506094.ogv \
|
||||
bug516323.ogv \
|
||||
dirac.ogg \
|
||||
seek.ogv \
|
||||
short-video.ogv \
|
||||
|
BIN
content/media/test/bug516323.ogv
Normal file
BIN
content/media/test/bug516323.ogv
Normal file
Binary file not shown.
@ -41,6 +41,8 @@ var gPlayTests = [
|
||||
{ name:"short-video.ogv", type:"video/ogg", duration:1.081 },
|
||||
// First Theora data packet is zero bytes.
|
||||
{ name:"bug504613.ogv", type:"video/ogg" },
|
||||
// Multiple audio streams.
|
||||
{ name:"bug516323.ogv", type:"video/ogg", duration:4.424 },
|
||||
|
||||
{ name:"bogus.duh", type:"bogus/duh" }
|
||||
];
|
||||
|
@ -13,3 +13,5 @@ endian.patch is applied to fix Bug 45269.
|
||||
|
||||
bug487519.patch: Fixes for bug487519
|
||||
|
||||
fishsound_reset.patch: Fixes bug 516323.
|
||||
|
||||
|
12
media/libfishsound/fishsound_reset.patch
Normal file
12
media/libfishsound/fishsound_reset.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/media/libfishsound/src/libfishsound/fishsound_vorbis.c b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
|
||||
--- a/media/libfishsound/src/libfishsound/fishsound_vorbis.c
|
||||
+++ b/media/libfishsound/src/libfishsound/fishsound_vorbis.c
|
||||
@@ -412,7 +412,7 @@
|
||||
FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
|
||||
|
||||
vorbis_block_init (&fsv->vd, &fsv->vb);
|
||||
-
|
||||
+ fsv->packetno = 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ fs_vorbis_reset (FishSound * fsound)
|
||||
FishSoundVorbisInfo * fsv = (FishSoundVorbisInfo *)fsound->codec_data;
|
||||
|
||||
vorbis_block_init (&fsv->vd, &fsv->vb);
|
||||
|
||||
fsv->packetno = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -41,3 +41,5 @@ cp $1/src/libfishsound/debug.h ./src/libfishsound/debug.h
|
||||
cp $1/AUTHORS ./AUTHORS
|
||||
patch -p3 <endian.patch
|
||||
patch -p3 <bug487519.patch
|
||||
patch -p3 <fishsound_reset.patch
|
||||
|
||||
|
@ -36,3 +36,4 @@ handle-read-errors.patch: Make oggplay_initialise() handle closing of stream
|
||||
while reading. Prevents infinite loop. Further fix
|
||||
to 17ef4ca82df28.
|
||||
|
||||
fishsound_reset.patch: Fixes bug 516323.
|
||||
|
24
media/liboggplay/fishsound_reset.patch
Normal file
24
media/liboggplay/fishsound_reset.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
|
@ -166,6 +166,20 @@ oggplay_seek_cleanup(OggPlay* me, ogg_int64_t milliseconds)
|
||||
|
||||
*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;
|
||||
}
|
||||
|
||||
|
@ -58,4 +58,4 @@ patch -p3 < bug500311.patch
|
||||
patch -p3 < faster_seek.patch
|
||||
patch -p3 < fix-17ef4ca82df28.patch
|
||||
patch -p3 < handle-read-errors.patch
|
||||
|
||||
patch -p3 < fishsound_reset.patch
|
||||
|
Loading…
Reference in New Issue
Block a user