summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-28 15:33:38 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-28 15:33:38 +0000
commitd9dca0c290b643d51eba73f036bc5962332f02e1 (patch)
treec27e60cb2eeb7c82f41a38adc046139a67456048 /libvo
parent22c633f15e34853fc17ed6241d73d4128bd44b88 (diff)
downloadmpv-d9dca0c290b643d51eba73f036bc5962332f02e1.tar.bz2
mpv-d9dca0c290b643d51eba73f036bc5962332f02e1.tar.xz
Patch by D. Holm to make audio with dxr3 working.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3187 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_dxr3.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c
index a60d2b8d1c..23de7c8786 100644
--- a/libvo/vo_dxr3.c
+++ b/libvo/vo_dxr3.c
@@ -381,7 +381,7 @@ init(uint32_t scr_width, uint32_t scr_height, uint32_t width, uint32_t height, u
/* 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 void draw_osd(void)
static uint32_t draw_frame(uint8_t * src[])
{
- int pts = 0;
if( img_format == IMGFMT_MPEGPES )
{
int data_left;
@@ -432,8 +431,7 @@ static uint32_t draw_frame(uint8_t * src[])
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 @@ static uint32_t draw_frame(uint8_t * src[])
#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 @@ static uint32_t draw_frame(uint8_t * src[])
{
}
}
- 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 )