diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-10-14 22:48:00 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-10-14 22:48:00 +0000 |
commit | 3e181c9ca926c45b6ec1d6c6ce2af22cc93712e3 (patch) | |
tree | df164f3dfdcbf8b7dfe95b2244c62f45ae942978 /src | |
parent | 5233af2142e5fd045f922a82fef0c76c62684a7b (diff) | |
download | xine-lib-3e181c9ca926c45b6ec1d6c6ce2af22cc93712e3.tar.gz xine-lib-3e181c9ca926c45b6ec1d6c6ce2af22cc93712e3.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/metronom.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 |