[MPlayer-G2-dev] CVS: g2/video vd_libmpeg2.c, 1.1.1.1, 1.2 vf_vd.c, 1.1.1.1, 1.2

Arpi of Ize syncmail at mplayerhq.hu
Sun Feb 22 17:19:09 CET 2004


CVS change done by Arpi of Ize

Update of /cvsroot/mplayer/g2/video
In directory mail:/var2/tmp/cvs-serv28061/video

Modified Files:
	vd_libmpeg2.c vf_vd.c 
Log Message:
- demuxer: changed PTS handling, export native PTS (based on rate_m/rate_d)
instead of scaled up by rate_m
- demux_avi: fixed nobps sync mode, when video chunkc come before audio ones
- demux_mpg: div native pts by 4, to fit 33 bits pts into 31 bits (signed int)


Index: vd_libmpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/g2/video/vd_libmpeg2.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- vd_libmpeg2.c	31 Jan 2004 20:16:18 -0000	1.1.1.1
+++ vd_libmpeg2.c	22 Feb 2004 16:19:07 -0000	1.2
@@ -209,7 +209,8 @@
         	    mpi->qstride=info->sequence->picture_width>>4;
 #endif
 		    if((info->display_picture->flags&PIC_FLAG_PTS)){
-			mpi->pts=(double)info->display_picture->pts/(double)sh->ds->rate_m;
+			mpi->pts=(double)((int)info->display_picture->pts)*(double)sh->ds->rate_d/(double)sh->ds->rate_m;
+//			printf("ZZZ v_pts=%8.8f\n",(float)mpi->pts);
 			if(delay_flag) mpi->pts-=info->sequence->frame_period/(2*2*27000000.0);
 			mpi->pts_flags|=MP_PTSFLAG_PTS_AVAIL;
 		    }

Index: vf_vd.c
===================================================================
RCS file: /cvsroot/mplayer/g2/video/vf_vd.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- vf_vd.c	31 Jan 2004 20:16:18 -0000	1.1.1.1
+++ vf_vd.c	22 Feb 2004 16:19:07 -0000	1.2
@@ -61,7 +61,7 @@
 	in_size=ds_get_packet(vf->priv->sh->ds,&start);
 	if(in_size<0) return NULL; // demux error / EOF
 	if(sh->ds->pts_packs==0)   // we have fresh pts
-	    pts=(double)sh->ds->pts/(double)sh->ds->rate_m;
+	    pts=(double)sh->ds->pts*(double)sh->ds->rate_d/(double)sh->ds->rate_m;
     }
     
     if(sh->ds->rate_m) frametime=(float)sh->ds->rate_d/(float)sh->ds->rate_m;




More information about the MPlayer-G2-dev mailing list