From 431ccd81e0c1bd30241731b6eec599058dbd5342 Mon Sep 17 00:00:00 2001 From: Christophe Thommeret Date: Fri, 23 Jan 2009 09:19:11 +0000 Subject: Get pts at picture start. May fix a/v sync on some ts. --- src/libvdpau/vdpau_mpeg12.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/libvdpau/vdpau_mpeg12.c b/src/libvdpau/vdpau_mpeg12.c index c18b35510..31cc891bb 100644 --- a/src/libvdpau/vdpau_mpeg12.c +++ b/src/libvdpau/vdpau_mpeg12.c @@ -332,6 +332,10 @@ static void picture_header( sequence_t *sequence, uint8_t *buf, int len ) if ( sequence->picture.state!=WANT_HEADER ) return; + if ( sequence->cur_pts ) { + sequence->seq_pts = sequence->cur_pts; + } + if ( sequence->profile==VDP_DECODER_PROFILE_MPEG1 ) sequence->picture.vdp_infos.picture_structure = PICTURE_FRAME; @@ -685,6 +689,7 @@ static void decode_picture( vdpau_mpeg12_decoder_t *vd ) seq->backward_ref = NULL; vd->decoder = VDP_INVALID_HANDLE; } + img->drawn = 0; //printf("vdpau_mpeg12: .. got image %d\n", img); -- cgit v1.2.3