[Libav-user] missing frames while decoding

Murthy avsn avsn9849625263 at hotmail.com
Mon Jul 9 11:48:07 CEST 2012


Hi a l ,thanks for you support.I have problem with decoding frames. I am trying to save frames in a h264 stream to .PPM file.I am trying to decode a 00:00:02.08 sec video with "24fps" . Problem: problem is that I could only decode 46 frames from the video .I wounder where are those 2 frames missing.Here is the snapshot of the code
while (av_read_frame(pFormatCtx, &packet) >= 0)    {        // Is this a packet from the video stream?        if (packet.stream_index == videoStream)        {            // Decode video frame            avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
            // Did we get a video frame?            if (frameFinished)            {                                // Save the frame to disk                    SaveFrame(pFrameRGB, pCodecCtx->width, pCodecCtx->height, ++framecount);            }        }
        // Free the packet that was allocated by av_read_frame        av_free_packet(&packet);    }
Here is the complete code :http://pastebin.com/3qsGrrCU
Can some one please help me in this aspect .

Thanks in advance.




 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120709/b60952b8/attachment.html>


More information about the Libav-user mailing list