I build ffmpeg 3.1.1 for iOS (arm64 only, for iOS 8.0 target) and decoding it with this alrorithm
- (NSArray *) decodeFrames: (CGFloat) minDuration { if(-1 == _videoStream && -1 == _audioStream) return nil; NSMutableArray *result = [NSMutableArray array]; AVPacket packet; CGFloat decodedDuration = 0; BOOL finished = NO; while(!finished) { if(!_formatCtx) break; /* * reads in a packet and stores it in the AVPacket struct */ if(0 > av_read_frame(_formatCtx, &packet)) { _isEOF = YES; break; } if(packet.stream_index ==_videoStream) { int pktSize = packet.size; while(0 < pktSize) { int gotframe = 0; /* * Decode video frame */ int len = avcodec_decode_video2(_videoCodecCtx, _videoFrame, &gotframe, &packet); if(0 > len) { LoggerVideo(0, @"decode video error, skip packet"); break; } if(gotframe) { …. I only update the ffmpeg version and avcodec_decode_video2 takes double time than 3.0 for 1920x1280 video. Please let me know which things should I try. Thanks. > 2016. 7. 5., 오후 7:22, Carl Eugen Hoyos <ceho...@ag.or.at> 작성: > >> mpeg 3.0 but >> lagging occurred when I updated it to 3.1.1.
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user