From 0a56519b53a8cb2f66c82a09d3db1b7c85e4edd3 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 6 Apr 2002 02:56:04 +0000 Subject: reset decoder on discontinuities (comments inside) CVS patchset: 1682 CVS date: 2002/04/06 02:56:04 --- src/xine-engine/audio_decoder.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 192dcb125..172557345 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_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: audio_decoder.c,v 1.68 2002/03/27 15:30:16 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.69 2002/04/06 02:56:04 miguelfreitas Exp $ * * * functions that implement audio decoding @@ -129,10 +129,19 @@ void *audio_decoder_loop (void *this_gen) { break; case BUF_CONTROL_DISCONTINUITY: + /* reseting decoder on discontinuities is needed to make sure there will + * be no held back pts values. it's unlikely that it would do any harm + * given metronom's in_discontinuity counter but, at least in theory, + * we might have problems with still frame + audio dvd menus. + */ + if (this->cur_audio_decoder_plugin) + this->cur_audio_decoder_plugin->reset (this->cur_audio_decoder_plugin); this->metronom->handle_audio_discontinuity (this->metronom, DISC_RELATIVE, buf->disc_off); break; case BUF_CONTROL_NEWPTS: + if (this->cur_audio_decoder_plugin) + this->cur_audio_decoder_plugin->reset (this->cur_audio_decoder_plugin); this->metronom->handle_audio_discontinuity (this->metronom, DISC_ABSOLUTE, buf->disc_off); break; -- cgit v1.2.3