[MPlayer-dev-eng] Re: [PATCH] demux_avi: instant A-V sync correction on seeking

Scott Oom other+mplayer at hoko.org
Thu Feb 9 12:14:10 CET 2006


On Tue, Feb 07, 2006 at 12:26:12PM -0800, Corey Hickey wrote:
> Applied. I only waited 45 hours. Forgive me; I thought the deadline had
> passed until I re-checked when I sent the parent message after already
> committing.
> 
> -Corey

This patch totally broke relative seeking for me, it seems demux_seek 
never actually passed the new audio_delay down to the actual demuxer.  
Attached a patch that fixes things for me.

-Scott
-------------- next part --------------
Index: libmpdemux/demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.215
diff -u -3 -p -r1.215 demuxer.c
--- libmpdemux/demuxer.c        7 Feb 2006 20:22:44 -0000       1.215
+++ libmpdemux/demuxer.c        9 Feb 2006 11:06:59 -0000
@@ -893,7 +893,7 @@ if(!demuxer->seekable){
 #endif
 
 if (demuxer->desc->seek)
-    demuxer->desc->seek(demuxer,rel_seek_secs,flags);
+    demuxer->desc->seek(demuxer,rel_seek_secs,audio_delay,flags);
 
     if (sh_audio) resync_audio_stream(sh_audio);
 
Index: libmpdemux/demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.86
diff -u -3 -p -r1.86 demuxer.h
--- libmpdemux/demuxer.h        7 Feb 2006 20:22:44 -0000       1.86
+++ libmpdemux/demuxer.h        9 Feb 2006 11:06:59 -0000
@@ -151,7 +151,7 @@ typedef struct demuxers_desc_st {
   /// Close the demuxer
   void (*close)(struct demuxer_st *demuxer); ///< Optional
   // Seek
-  void (*seek)(struct demuxer_st *demuxer, float rel_seek_secs, int flags); ///< Optional
+  void (*seek)(struct demuxer_st *demuxer, float rel_seek_secs, float audio_delay, int flags); ///< Optional
   // Control
   int (*control)(struct demuxer_st *demuxer, int cmd, void *arg); ///< Optional
 } demuxer_desc_t;



More information about the MPlayer-dev-eng mailing list