[MPlayer-cvslog] CVS: main/libmpdemux demuxer.c, 1.221, 1.222 demuxer.h, 1.93, 1.94 stheader.h, 1.43, 1.44

Uoti Urpala CVS syncmail at mplayerhq.hu
Thu Apr 27 13:13:24 CEST 2006


CVS change done by Uoti Urpala CVS

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

Modified Files:
	demuxer.c demuxer.h stheader.h 
Log Message:
Change common pts variables from floats to doubles. Individual demuxers
should be changed later.


Index: demuxer.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -r1.221 -r1.222
--- demuxer.c	24 Apr 2006 10:58:40 -0000	1.221
+++ demuxer.c	27 Apr 2006 11:13:21 -0000	1.222
@@ -314,7 +314,7 @@
         dp->len,dp->pts,(unsigned int)dp->pos,ds->demuxer->audio->packs,ds->demuxer->video->packs);
 }
 
-void ds_read_packet(demux_stream_t *ds,stream_t *stream,int len,float pts,off_t pos,int flags){
+void ds_read_packet(demux_stream_t *ds, stream_t *stream, int len, double pts, off_t pos, int flags) {
     demux_packet_t* dp=new_demux_packet(len);
     len = stream_read(stream,dp->buffer,len);
     resize_demux_packet(dp, len);
@@ -538,7 +538,8 @@
     }
 }
 
-float ds_get_next_pts(demux_stream_t *ds) {
+double ds_get_next_pts(demux_stream_t *ds)
+{
   demuxer_t* demux = ds->demuxer;
   while(!ds->first) {
     if(demux->audio->packs>=MAX_PACKS || demux->audio->bytes>=MAX_PACK_BYTES){

Index: demuxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demuxer.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- demuxer.h	24 Apr 2006 10:58:40 -0000	1.93
+++ demuxer.h	27 Apr 2006 11:13:21 -0000	1.94
@@ -76,7 +76,7 @@
 // Holds one packet/frame/whatever
 typedef struct demux_packet_st {
   int len;
-  float pts;
+  double pts;
   off_t pos;  // position in index (AVI) or file (MPG)
   unsigned char* buffer;
   int flags; // keyframe, etc
@@ -89,7 +89,7 @@
   int buffer_pos;          // current buffer position
   int buffer_size;         // current buffer size
   unsigned char* buffer;   // current buffer, never free() it, always use free_demux_packet(buffer_ref);
-  float pts;               // current buffer's pts
+  double pts;              // current buffer's pts
   int pts_bytes;           // number of bytes read after last pts stamp
   int eof;                 // end of demuxed stream? (true if all buffer empty)
   off_t pos;                 // position in the input stream (file)
@@ -244,7 +244,7 @@
 void free_demuxer(demuxer_t *demuxer);
 
 void ds_add_packet(demux_stream_t *ds,demux_packet_t* dp);
-void ds_read_packet(demux_stream_t *ds,stream_t *stream,int len,float pts,off_t pos,int flags);
+void ds_read_packet(demux_stream_t *ds, stream_t *stream, int len, double pts, off_t pos, int flags);
 
 int demux_fill_buffer(demuxer_t *demux,demux_stream_t *ds);
 int ds_fill_buffer(demux_stream_t *ds);
@@ -286,7 +286,7 @@
 int ds_get_packet(demux_stream_t *ds,unsigned char **start);
 int ds_get_packet_pts(demux_stream_t *ds, unsigned char **start, double *pts);
 int ds_get_packet_sub(demux_stream_t *ds,unsigned char **start);
-float ds_get_next_pts(demux_stream_t *ds);
+double ds_get_next_pts(demux_stream_t *ds);
 
 // This is defined here because demux_stream_t ins't defined in stream.h
 stream_t* new_ds_stream(demux_stream_t *ds);

Index: stheader.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stheader.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- stheader.h	24 Apr 2006 10:58:40 -0000	1.43
+++ stheader.h	27 Apr 2006 11:13:21 -0000	1.44
@@ -11,7 +11,7 @@
   struct codecs_st *codec;
   unsigned int format;
   int inited;
-  float delay;	   // relative (to sh_video->timer) time in audio stream
+  double 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;
@@ -62,8 +62,8 @@
   float num_frames;       // number of frames played
   int num_frames_decoded; // number of frames decoded
   // timing (mostly for mpeg):
-  float pts;     // predicted/interpolated PTS of the current frame
-  float i_pts;   // PTS for the _next_ I/P frame
+  double pts;     // predicted/interpolated PTS of the current frame
+  double i_pts;   // PTS for the _next_ I/P frame
   // output format: (set by demuxer)
   float fps;              // frames per second (set only if constant fps)
   float frametime;        // 1/fps




More information about the MPlayer-cvslog mailing list