[FFmpeg-devel] [PATCH] RoQ muxer

Vitor vitor1001
Mon May 7 17:25:58 CEST 2007

Michael Niedermayer wrote:
>> +    int ret = av_interleave_packet_per_dts(s, pkt, in, flush);
> why the "double" interleave
I thought that it would be necessary in the case where the video starts 
a few seconds before the audio. Since I don't know how FFmpeg manages 
that internally, I wanted to be sure not to get audio frames too soon.
>> +    /* If there are 2 frames of video pending and no audio, assume there's no
>> +     * more audio */
>> +    if (!ctx->queueBase[0] && ctx->queueBase[1] && ctx->queueBase[1]->next)
>> +        ctx->nxtPkt = PACKETTYPE_VIDEO;
> what is this code good for / in which case would it fail if this wherent here?
In the case I just talked about and in the case that there is no audio 
at all. Note that if there is a few seconds of video without audio, it 
will schedule the video frames until the first audio frame is 
interleaved by dts. It will then add it immediately.


More information about the ffmpeg-devel mailing list