[Mplayer-cvslog] CVS: main/libvo vo_dxr3.c,1.6,1.7

Atmosfear atmos4 at mplayer.dev.hu
Wed Nov 28 16:33:40 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv22863/libvo

Modified Files:
	vo_dxr3.c 
Log Message:
Patch by D. Holm to make audio with dxr3 working.


Index: vo_dxr3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dxr3.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vo_dxr3.c	18 Nov 2001 13:10:22 -0000	1.6
+++ vo_dxr3.c	28 Nov 2001 15:33:38 -0000	1.7
@@ -381,7 +381,7 @@
         /* open it */
         if (avcodec_open(&codec_context, codec) < 0) 
 	{
-            printf(stderr, "VO: [dxr3] Could not open codec\n");
+            printf( "VO: [dxr3] Could not open codec\n" );
             return -1;
         }
 
@@ -424,7 +424,6 @@
 
 static uint32_t draw_frame(uint8_t * src[])
 {
-    int pts = 0;
     if( img_format == IMGFMT_MPEGPES )
     {
         int data_left;
@@ -432,8 +431,7 @@
 	unsigned char *data = p->data;
 
 	data_left = p->size;
-	pts = p->timestamp;
-	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &pts ) < 0 )
+	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts ) < 0 )
 	    printf( "VO: [dxr3] Unable to set PTS in draw_frame\n" );
 	while( data_left )
 	    data_left -= write( fd_video, &((unsigned char*)p->data)[p->size-data_left], data_left );
@@ -516,8 +514,7 @@
 #undef ONE_HALF
 #undef FIX(x)
 	//End of ffmpeg code, see ffmpeg.sourceforge.net for terms of license
-	pts = vo_pts;
-	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &pts ) < 0 )
+	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts ) < 0 )
 	    printf( "VO: [dxr3] Unable to set PTS in draw_frame\n" );
         tmp_size = out_size = avcodec_encode_video(&codec_context, outbuf, outbuf_size, &picture);
 	while( out_size )
@@ -535,8 +532,8 @@
 	    {
 	    }
 	}
-	pts = vo_pts;
-	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &pts ) < 0 )
+
+	if( ioctl( fd_video, EM8300_IOCTL_VIDEO_SETPTS, &vo_pts ) < 0 )
 	    printf( "VO: [dxr3] Unable to set PTS in draw_frame\n" );
         tmp_size = out_size = avcodec_encode_video(&codec_context, outbuf, outbuf_size, &picture);
         while( out_size )




More information about the MPlayer-cvslog mailing list