I think this  is what you told ?? but when programm starts, first
timestamp =0 ,
keyframes[i]=1 (keyframe value is right),
avseekframe returns 0 ,
avcodec_decode_video2 returns 7854,
framefinished=216..
THey don't make any sense :S

(index is 275)
for(i=0;i<index+1;i++){
                //int64_t timeStamp = (int64_t)((pFormatCtx->duration) /
framecount)*keyFrames[i]/1000;
                int64_t timeStamp = packet.pts * pFormatCtx-
>streams[keyFrames[i]]->time_base.den;


                int
t=av_seek_frame(pFormatCtx,keyFrames[i],timeStamp,AVSEEK_FLAG_ANY);

                 while(av_read_frame(pFormatCtx, &packet)>=0){

                        if (packet.pts >= timeStamp){
                                int t=avcodec_decode_video2(pCodecCtx, pFrame,
&frameFinished,&packet);

                                if (frameFinished){
                                        SaveFrame(pFrame, pCodecCtx->width, 
pCodecCtx-
>height,keyFrames[i]);
                                        break;
                                }
                        }
                        av_free_packet(&packet);
                }
        }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to