gecko/media/liboggplay/bug500311.patch

80 lines
2.5 KiB
Diff

diff --git a/media/liboggplay/src/liboggplay/oggplay.c b/media/liboggplay/src/liboggplay/oggplay.c
--- a/media/liboggplay/src/liboggplay/oggplay.c
+++ b/media/liboggplay/src/liboggplay/oggplay.c
@@ -149,16 +149,17 @@ oggplay_initialise(OggPlay *me, int bloc
}
/*
* set all the tracks to inactive
*/
for (i = 0; i < me->num_tracks; i++) {
me->decode_data[i]->active = 0;
}
+ me->active_tracks = 0;
/*
* if the buffer was set up before initialisation, prepare it now
*/
if (me->buffer != NULL) {
oggplay_buffer_prepare(me);
}
diff --git a/media/liboggplay/src/liboggplay/oggplay_callback.c b/media/liboggplay/src/liboggplay/oggplay_callback.c
--- a/media/liboggplay/src/liboggplay/oggplay_callback.c
+++ b/media/liboggplay/src/liboggplay/oggplay_callback.c
@@ -60,16 +60,17 @@ oggplay_init_theora(void *user_data) {
theora_info_init(&(decoder->video_info));
theora_comment_init(&(decoder->video_comment));
decoder->granulepos_seen = 0;
decoder->frame_delta = 0;
decoder->y_width = 0;
decoder->convert_to_rgb = 0;
decoder->swap_rgb = 0;
decoder->decoder.decoded_type = OGGPLAY_YUV_VIDEO;
+ decoder->decoder.player->active_tracks++;
}
void
oggplay_shutdown_theora(void *user_data) {
OggPlayDecode * common;
OggPlayTheoraDecode * decoder = (OggPlayTheoraDecode *)user_data;
if (decoder == NULL) {
@@ -499,16 +500,17 @@ oggplay_init_audio (void * user_data) {
}
decoder->sound_info.channels = 0;
fish_sound_set_decoded_float_ilv(decoder->sound_handle,
oggplay_fish_sound_callback_floats,
(void *)decoder);
decoder->decoder.decoded_type = OGGPLAY_FLOATS_AUDIO;
+ decoder->decoder.player->active_tracks++;
}
void
oggplay_shutdown_audio(void *user_data) {
OggPlayAudioDecode * decoder = (OggPlayAudioDecode *)user_data;
if (decoder == NULL) {
@@ -814,17 +816,17 @@ oggplay_initialise_decoder(OggPlay *me,
if (decoder == NULL)
return NULL;
decoder->serialno = serialno;
decoder->content_type = content_type;
decoder->content_type_name =
oggz_stream_get_content_type (me->oggz, serialno);
- decoder->active = 0;
+ decoder->active = 1;
decoder->final_granulepos = -1;
decoder->player = me;
decoder->decoded_type = OGGPLAY_TYPE_UNKNOWN;
decoder->num_header_packets =
oggz_stream_get_numheaders (me->oggz, serialno);
/*
* set the StreamInfo to unitialised until we get some real data in