Hello,

Until now, I was using avcodec_audio_decode3(). But as I moved on to FFmpeg 
2.0, I got issues with some decoders that indicated I should move on to 
avcodec_audio_decode4(). So that's what I am doing at the moment.

However, there is one part of the audio decode example that I do not understand:
if (avpkt.size < AUDIO_REFILL_THRESH) {
    /* Refill the input buffer, to avoid trying to decode
     * incomplete frames. Instead of this, one could also use
     * a parser, or use a proper container format through
     * libavformat. */
    memmove(inbuf, avpkt.data, avpkt.size);
    avpkt.data = inbuf;
    len = fread(avpkt.data + avpkt.size, 1,
                AUDIO_INBUF_SIZE - avpkt.size, f);
    if (len > 0)
        avpkt.size += len;
}

Does that mean that AVPacket can contain incomplete frames? I would have 
expected an AVPacket to contain one or several frames, but not incomplete ones…

I also do not understand what the 'parser' and 'proper container format' 
solutions would be.

Regards,
Lucas
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to