]> git.sesse.net Git - vlc/blobdiff - modules/access/v4l2/demux.c
BluRay instead of Blu-Ray. Re-using short messages for long ones
[vlc] / modules / access / v4l2 / demux.c
index aa70a25b99400ebb351221e388d95451518bed41..9d9b2ffcca4e87887ca892f8beb875b8f963071a 100644 (file)
@@ -410,7 +410,7 @@ static int InitVideo (demux_t *demux, int fd, uint32_t caps)
     void *(*entry) (void *);
     if (caps & V4L2_CAP_STREAMING)
     {
-        if (StartUserPtr (VLC_OBJECT(demux), fd) == 0)
+        if (0 /* BROKEN */ && StartUserPtr (VLC_OBJECT(demux), fd) == 0)
         {
             /* In principles, mmap() will pad the length to a multiple of the
              * page size, so there is no need to care. Nevertheless with the
@@ -566,7 +566,7 @@ static void *UserPtrThread (void *data)
 
         assert (block->p_buffer == (void *)buf.m.userptr);
         block->i_buffer = buf.length;
-        block->i_pts = block->i_dts = mdate ();
+        block->i_pts = block->i_dts = GetBufferPTS (&buf);
         block->i_flags |= sys->block_flags;
         es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
         es_out_Send (demux->out, sys->es, block);
@@ -611,7 +611,6 @@ static void *MmapThread (void *data)
             block_t *block = GrabVideo (VLC_OBJECT(demux), fd, sys->bufv);
             if (block != NULL)
             {
-                block->i_pts = block->i_dts = mdate ();
                 block->i_flags |= sys->block_flags;
                 es_out_Control (demux->out, ES_OUT_SET_PCR, block->i_pts);
                 es_out_Send (demux->out, sys->es, block);