lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Mar 2014 22:50:52 -0400
From:	Olivier Langlois <>
To:	Laurent Pinchart <>
Cc:,,, Stable <>
Subject: Re: [PATCH] [media] uvcvideo: Fix clock param realtime setting

> > > 
> > > Before applying this, I'm curious, do you have a use case for realtime
> > > time stamps ?
> > 
> > Yes. ffmpeg uses wall clock time to create timestamps for audio packets from
> > ALSA device.
> OK. I suppose I shouldn't drop support for the realtime clock like I wanted to 
> then :-)
> > There is a bug in ffmpeg describing problems to synchronize audio and
> > the video from a v4l2 webcam.
> > 
> >
> > 
> > To workaround this issue, ffmpeg devs added a switch to convert back
> > monotonic to realtime. From ffmpeg/libavdevice/v4l2.c:
> > 
> >   -ts                <int>        .D.... set type of timestamps for
> > grabbed frames (from 0 to 2) (default 0)
> >      default                      .D.... use timestamps from the kernel
> >      abs                          .D.... use absolute timestamps (wall
> > clock)
> >      mono2abs                     .D.... force conversion from monotonic
> > to absolute timestamps
> > 
> > If the v4l2 driver is able to send realtime ts, it is easier synchronize
> > in userspace if all inputs use the same clock.
> That might be a stupid question, but shouldn't ALSA use the monotonic clock 
> instead ?

This isn't stupid. I had the same though after replying you.
Intuitively, I would think that monotonic clock is a better choice for
multimedia. I am just speculating but I would say that ffmpeg decided to
use realtime clock as the standard clock throughout the project for
portability purposes since it is a cross-platform project.

Now you know how I ended up trying the clock=realtime option.
IMHO, if the option is there, it should be working but just removing it
could also be a valid option.

I feel that this could bring some new problems if it stays there
because, I'll be honest and say that I didn't test the driver behavior
when the time goes backward....

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists