我们从ijk中seek的处理流程来看ffmpeg的这个问题
int ffp_seek_to_l(FFPlayer *ffp, long msec)
{
assert(ffp);
VideoState *is = ffp->is;
int64_t start_time = 0;
int64_t seek_pos = milliseconds_to_fftime(msec);
int64_t duration = milliseconds_to_fftime(ffp_get_duration_l(ffp));
if (!is)
return EIJK_NULL_IS_PTR;
//add by hxk
if(ffp->loopStart != 0 && ffp->loopEnd != INT_MAX){
//use setLooping
setLooping,
} else {
//not use setLooping
resetLoopStartAndEnd(ffp);
}
//add end
if (duration > 0 && seek_pos >= duration && ffp->enable_accurate_seek) {
toggle_pause(ffp, 1);
ffp_notify_msg1(ffp, FFP_MSG_COMPLETED);
return 0;
}
start_time = is->ic->start_time;
if (start_time > 0 && start_time != AV_NOPTS_VALUE)
seek_pos += start_time;
// FIXME: 9 seek by bytes
// FIXME: 9 seek out of