summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Lampard <mlampard@users.sourceforge.net>2001-10-27 17:33:28 +0000
committerMike Lampard <mlampard@users.sourceforge.net>2001-10-27 17:33:28 +0000
commitd6ebdd316a1ff92e139b03d899e4f8dbfdff82e5 (patch)
tree8f7b487aa7a8553d6aff437503a0b4baa0d7d650 /src
parent83583150658de7be2f8a354c40e0995f6cd2618c (diff)
downloadxine-lib-d6ebdd316a1ff92e139b03d899e4f8dbfdff82e5.tar.gz
xine-lib-d6ebdd316a1ff92e139b03d899e4f8dbfdff82e5.tar.bz2
update vpts when we receive a video_fill packet
CVS patchset: 897 CVS date: 2001/10/27 17:33:28
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_decoder.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c
index dc0cb927a..16abf4841 100644
--- a/src/dxr3/dxr3_decoder.c
+++ b/src/dxr3/dxr3_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decoder.c,v 1.21 2001/10/24 15:53:23 mlampard Exp $
+ * $Id: dxr3_decoder.c,v 1.22 2001/10/27 17:33:28 mlampard Exp $
*
* dxr3 video and spu decoder plugin. Accepts the video and spu data
* from XINE and sends it directly to the corresponding dxr3 devices.
@@ -249,8 +249,19 @@ static void dxr3_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
dxr3_decoder_t *this = (dxr3_decoder_t *) this_gen;
ssize_t written;
- /* Ignore videofill packets */
- if (buf->type == BUF_VIDEO_FILL) return;
+ /* Increment vpts for videofill packets to keep in sync with audio...
+ fixes issues with the Matrix etc... */
+ if(buf->type == BUF_VIDEO_FILL) {
+ int vpts;
+ static int videofill_count=0;
+ /* pthread_mutex_lock (&this->video_decoder.metronom->lock); */
+ videofill_count += this->video_decoder.metronom->pts_per_frame +
+ this->video_decoder.metronom->video_pts_delta;
+ /* pthread_mutex_unlock (&this->video_decoder.metronom->lock);*/
+ vpts = this->video_decoder.metronom->got_video_frame(
+ this->video_decoder.metronom, videofill_count);
+ return;
+ }
/* The dxr3 does not need the preview-data */
if (buf->decoder_info[0] == 0) return;