diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-12 18:40:50 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-12 18:40:50 +0000 |
commit | 5caae571ccadaaf00a90d4ec321c5ab4b4cc4191 (patch) | |
tree | 76f5a2032230468f0321cdccd221768b419ffec0 /src/libxineadec/fooaudio.c | |
parent | 1083056bd34700d1b21171cabf507eab1620be27 (diff) | |
download | xine-lib-5caae571ccadaaf00a90d4ec321c5ab4b4cc4191.tar.gz xine-lib-5caae571ccadaaf00a90d4ec321c5ab4b4cc4191.tar.bz2 |
merge metronom's improvements (inform decoders about discontinuities)
http://sourceforge.net/mailarchive/forum.php?thread_id=1297475&forum_id=7131
CVS patchset: 3250
CVS date: 2002/11/12 18:40:50
Diffstat (limited to 'src/libxineadec/fooaudio.c')
-rw-r--r-- | src/libxineadec/fooaudio.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c index 5368d6b5f..f8b9d938f 100644 --- a/src/libxineadec/fooaudio.c +++ b/src/libxineadec/fooaudio.c @@ -21,7 +21,7 @@ * player. It really works too! It will output a continuous sine wave in * place of the data it should actually send. * - * $Id: fooaudio.c,v 1.2 2002/11/11 05:01:35 tmmm Exp $ + * $Id: fooaudio.c,v 1.3 2002/11/12 18:40:53 miguelfreitas Exp $ */ #include <stdio.h> @@ -225,6 +225,15 @@ static void fooaudio_reset (audio_decoder_t *this_gen) { this->last_pts = -1; } +/* This function resets the last pts value of the audio decoder. */ +static void fooaudio_discontinuity (audio_decoder_t *this_gen) { + + fooaudio_decoder_t *this = (fooaudio_decoder_t *) this_gen; + + /* this is specific to fooaudio */ + this->last_pts = -1; +} + /* This function closes the audio output and frees the private audio decoder * structure. */ static void fooaudio_dispose (audio_decoder_t *this_gen) { @@ -252,6 +261,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre /* connect the member functions */ this->audio_decoder.decode_data = fooaudio_decode_data; this->audio_decoder.reset = fooaudio_reset; + this->audio_decoder.discontinuity = fooaudio_discontinuity; this->audio_decoder.dispose = fooaudio_dispose; /* connect the stream */ @@ -333,7 +343,7 @@ static decoder_info_t dec_info_audio = { * will export to the public. */ plugin_info_t xine_plugin_info[] = { /* { type, API version, "name", version, special_info, init_function }, */ - { PLUGIN_AUDIO_DECODER, 10, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "fooaudio", XINE_VERSION_CODE, &dec_info_audio, &init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |