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/libmad | |
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/libmad')
-rw-r--r-- | src/libmad/xine_decoder.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c index cd1010273..0433a3243 100644 --- a/src/libmad/xine_decoder.c +++ b/src/libmad/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.33 2002/10/21 23:22:29 tmattern Exp $ + * $Id: xine_decoder.c,v 1.34 2002/11/12 18:40:51 miguelfreitas Exp $ * * stuff needed to turn libmad into a xine decoder plugin */ @@ -75,6 +75,13 @@ static void mad_reset (audio_decoder_t *this_gen) { } +static void mad_discontinuity (audio_decoder_t *this_gen) { + + mad_decoder_t *this = (mad_decoder_t *) this_gen; + + this->pts = 0; +} + /* utility to scale and round samples to 16 bits */ static inline @@ -276,6 +283,7 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, xine_stre this->audio_decoder.decode_data = mad_decode_data; this->audio_decoder.reset = mad_reset; + this->audio_decoder.discontinuity = mad_discontinuity; this->audio_decoder.dispose = mad_dispose; this->output_open = 0; @@ -335,6 +343,6 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_AUDIO_DECODER, 10, "mad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, + { PLUGIN_AUDIO_DECODER, 11, "mad", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |