diff libmpdemux/demux_lavf.c @ 17636:b849a99cdc3c

Second-try commit of this patch. 1. Include audio_delay as an argument to demux_seek. 2. Modify demux_seek_avi to adjust the audio/video stream positions so that mplayer/mencoder will instantly be in sync even when -delay is specified. I've quadruple checked this time; hopefully I haven't missed anything.
author corey
date Fri, 17 Feb 2006 01:57:41 +0000
parents 6c541a8421ca
children 3fe3b2b3a6ce
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Thu Feb 16 22:43:42 2006 +0000
+++ b/libmpdemux/demux_lavf.c	Fri Feb 17 01:57:41 2006 +0000
@@ -389,9 +389,9 @@
     return 1;
 }
 
-static void demux_seek_lavf(demuxer_t *demuxer, float rel_seek_secs, int flags){
+static void demux_seek_lavf(demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int flags){
     lavf_priv_t *priv = demuxer->priv;
-    mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_seek_lavf(%p, %f, %d)\n", demuxer, rel_seek_secs, flags);
+    mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_seek_lavf(%p, %f, %f, %d)\n", demuxer, rel_seek_secs, audio_delay, flags);
     
 #if LIBAVFORMAT_BUILD < 4619
     av_seek_frame(priv->avfc, -1, priv->last_pts + rel_seek_secs*AV_TIME_BASE);