[FFmpeg-devel] [PATCH 2/2] lavd/pulse_audio_enc: allow non monotonic streams
lukasz.m.luki at gmail.com
Wed Jan 8 13:51:36 CET 2014
> > OTOH, I am afraid this patchset is wrong for another reason: if a
> > discontinuity is feed to the device, then av_get_output_timestamp() will
> > return strange results while the samples around the discontinuity are in
> > device buffer. I believe the application should not pass through the
> > timestamps from the input and rather synthesize its own monotonic
> > timestamps.
I did expect that flush is done before writing packet with discontinued
In case of pulseaudio pa_simple_drain (which waist until whole buffer is
played) can be used when discontinuity is detected.
Regarding synthesizing monotonic timestamps ffmpeg does it itself, so
application may just do nothing, but it is not easy by application to
determine current position in audio stream. Imagine you have 1sec buffer
and you do seek every 0,1sec. Determining current position in stream is
I skipped remarks posted by Michael, they are valuable, but doesn't regard
this commit directly.
If we had behavior described by Michael then patch would be wrong, but in
current state it makes things simpler.
If you don't agree to merge then I just keep this patch locally.
More information about the ffmpeg-devel