[libav-api] Decoded video timestamping

Andrey Utkin andrey.krieger.utkin at gmail.com
Thu Nov 3 15:11:12 CET 2011


The issue i mentioned was caused by the fact i timestamped outgoing
audio with just incrementing pts by duration, relatively to previous
processed frames. Now i added checks for gaps in received packets. (I
mean, if you read by UDP, you can loose series of packets).
The logic is like

int64_t gap = pkt.pts - pkt.duration - current_out_pts;
if (gap) {
    printf("Gap detected, shifting audio timestamps by %d\n", gap);
    current_out_pts += gap;
}

The issue, of course, was not specific to libav fork only.

-- 
Andrey Utkin


More information about the libav-api mailing list