[FFmpeg-devel] [PATCH] ALSA for libavdevice

Luca Abeni lucabe72
Wed Dec 10 09:34:11 CET 2008


Hi,

Michael Niedermayer wrote:
[...]
>> +    }
>> +    pkt->size = res * s->frame_size;
> 
>> +    pkt->pts = av_gettime();   /* FIXME: We might need something better... */
> 
> yes, this really needs to be improved, this is unacceptable unless alsa
> completely lacks functionality to do better

Just a short email to say that this is totally my fault: when I wrote this code,
I've been told that the current time should be corrected using some alsa call that
returns the current state of the audio buffer (it is also mentioned in some alsa
tutorials, I think). I tried it, but I've not been able to notice any difference
(A/V synch was good even with the current code - maybe because I used small audio
buffers, maybe because I've been lucky, or maybe because the CPU load was low...
I do not know).
So, I did not include that code, because I was not able to validate it. Not
the best decision, I admit.

Anyway, I hope Nicolas will be able to easily add the needed correction to the
pts.



				Luca




More information about the ffmpeg-devel mailing list