[Libav-user] avcodec_decode_video called twice then only its decoding first frame

Bruce Wheaton bruce at spearmorgan.com
Wed Nov 30 20:37:42 CET 2011


On Nov 30, 2011, at 6:12, "Basha, Asif" <Asif.Basha at Honeywell.com> wrote:

> Hi,
>  
>     I am facing problem while decoding H264 first Frame(I Frame) by using FFMPEG avcodec_decode_video() If avcodec_decode_video() called twice then it’s working fine. Can you please suggest me regarding this issue. 
>  
> Regards,
> Asif

Asif, since ffmpeg now uses multi threading, there's a one 'frame' delay in delivering frames. This impacts the start of playback, where the first decode won't return a frame (it starts decoding on one or more threads), and the end of a file, where you need to keep decoding a few times to flush frames out. 

That may be what you're seeing. It's 'normal'. 

Bruce 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111130/0a37047b/attachment.html>


More information about the Libav-user mailing list