From 3e181c9ca926c45b6ec1d6c6ce2af22cc93712e3 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Tue, 14 Oct 2003 22:48:00 +0000 Subject: Fix DISC_ABSOLUTE (and DISC_RELATIVE) for audio only streams. this->vpts_offset was computed using this->video_vpts (and not this->audio_vpts) but no video frames are generated when playing an audio only stream, this->video_vpts and this->audio_vpts are really different in this case. This patch aligns this->video_vpts and this->audio_vpts to the max. These values were already aligned for DISC_STREAMSTART and DISC_STREAMSEEK. Miguel, Michael: do you know why it was not done for DISC_ABSOLUTE ? ok, slap me if it's completely stupid. CVS patchset: 5521 CVS date: 2003/10/14 22:48:00 --- src/xine-engine/metronom.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index ae500e8a0..f24695a57 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.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: metronom.c,v 1.121 2003/09/15 04:02:45 jcdutton Exp $ + * $Id: metronom.c,v 1.122 2003/10/14 22:48:00 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -322,7 +322,13 @@ static void metronom_handle_video_discontinuity (metronom_t *this, int type, printf ("metronom: audio vpts adjusted with prebuffer to %lld\n", this->audio_vpts); } - + + if (this->video_vpts > this->audio_vpts) { + this->audio_vpts = this->video_vpts; + } else { + this->video_vpts = this->audio_vpts; + } + #ifdef LOG printf ("metronom: video_vpts: %lld, audio_vpts: %lld\n", this->video_vpts, this->audio_vpts); #endif -- cgit v1.2.3