[MPlayer-cvslog] CVS: main/libmpdemux demux_avi.c, 1.73, 1.74 stheader.h, 1.41, 1.42

Corey Hickey CVS syncmail at mplayerhq.hu
Sat Feb 18 10:26:41 CET 2006


CVS change done by Corey Hickey CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv5707/libmpdemux

Modified Files:
	demux_avi.c stheader.h 
Log Message:
dwStart support for mplayer.

* demux_avi sets stream_delay according to dwStart
* mplayer adjusts audio_delay according to stream_delay

3 related patches are pending, and I will apply them over the next few
days if all goes well.

As I mentioned on -dev-eng, the funny indentation is in preparation for
one of those pending patches.

See:
Date: Fri, 17 Feb 2006 00:53:28 -0800
To: mplayer-dev-eng at mplayerhq.hu
Subject: [PATCH] bframes, dwStart: individual patches


Index: demux_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- demux_avi.c	17 Feb 2006 01:57:40 -0000	1.73
+++ demux_avi.c	18 Feb 2006 09:26:38 -0000	1.74
@@ -612,6 +612,12 @@
     mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%d (%u)  audio size=%d\n",vsize,priv->numberofframes,asize);
     sh_video->i_bps=(float)vsize/(sh_video->frametime*priv->numberofframes);
   }
+
+  if (sh_video)
+    sh_video->stream_delay = (float)sh_video->video.dwStart * sh_video->video.dwScale/sh_video->video.dwRate;
+  if (sh_audio)
+    sh_audio->stream_delay = (float)sh_audio->audio.dwStart * sh_audio->audio.dwScale/sh_audio->audio.dwRate;
+
   return demuxer;
   
 }

Index: stheader.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stheader.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- stheader.h	25 Feb 2005 11:17:43 -0000	1.41
+++ stheader.h	18 Feb 2006 09:26:39 -0000	1.42
@@ -12,6 +12,7 @@
   unsigned int format;
   int inited;
   float delay;	   // relative (to sh_video->timer) time in audio stream
+  float stream_delay; // number of seconds stream should be delayed (according to dwStart or similar)
   // output format:
   int sample_format;
   int samplerate;
@@ -54,6 +55,7 @@
   unsigned int format;
   int inited;
   float timer;		  // absolute time in video stream, since last start/seek
+  float stream_delay; // number of seconds stream should be delayed (according to dwStart or similar)
   // frame counters:
   float num_frames;       // number of frames played
   int num_frames_decoded; // number of frames decoded




More information about the MPlayer-cvslog mailing list