Definition at line 148 of file RgbDataSrcLavc_old.h. References FindNextDecodedFrame(), ILOG_DEBUG, ILOG_ERROR, mCodecCtx, mFormatCtx, mJumpMethod, and mVideoStreamIndex. Referenced by JumpToKeyFrame(). 00149 { 00150 ILOG_DEBUG("Attempting jump to " << newPos << " (method: " << 00151 mJumpMethod << ")"); 00152 00153 if (mCodecCtx->codec->flush == NULL) 00154 flush = 0; // never flush 00155 else if (flush & 1) // flush before seek (flushing was introduced by Taylan) 00156 mCodecCtx->codec->flush(mCodecCtx); 00157 00158 //ILOG_DEBUG("[Jump] " << mVideoStream->last_IP_duration << " " << mVideoStream->cur_dts); 00159 int res = av_seek_frame(mFormatCtx, mVideoStreamIndex, newPos, flag); 00160 //ILOG_DEBUG("[Jump] " << mVideoStream->last_IP_duration << " " << mVideoStream->cur_dts); 00161 00162 if (res >= 0) 00163 { 00164 if (flush & 2) // flush after seek (flushing was introduced by Taylan) 00165 mCodecCtx->codec->flush(mCodecCtx); 00166 } 00167 else 00168 { 00169 ILOG_ERROR("av_seek_frame returned negative value: " << res << 00170 " (" << newPos << " " << flag << " " << flush << " " << sync << ")"); 00171 return; 00172 } 00173 00174 if (sync == 1) 00175 FindNextDecodedFrame(false); 00176 else 00177 if (sync == 2) 00178 FindNextDecodedFrame(true); 00179 }
Here is the call graph for this function:
|