[Libav-user] the parameter got_picture_ptr of the avcodec_decode_video2 function

chris_magic qq549349740 at gmail.com
Mon May 9 03:34:53 CEST 2011


Hi all,
     I want to know something about the function avcodec_decode_video2
.Previously ,I thought once I invoke the function
avcodec_decode_video2(avctx ,pic ,got_picture_ptr ,avpkt) ,and the value of
the got_picture_ptr will be backed.But now ,I find that my idea is wrong ,
with the help of the software of Elecard StreamEye ,I see that at start
server frame ,after two or three frames have been decoded and the vaule of
the got_picture_ptr then will be set .I don't know why? But I  this that
there is something about the buffer.

my codes:
 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);
                      if(frameFinished) {  
                                printf("----j = %d \n" ,j);
                        }


--
View this message in context: http://libav-users.943685.n4.nabble.com/the-parameter-got-picture-ptr-of-the-avcodec-decode-video2-function-tp3508235p3508235.html
Sent from the libav-users mailing list archive at Nabble.com.


More information about the Libav-user mailing list