double pos = 7.1;
int64_t tm = (int64_t)(pos * AV_TIME_BASE);
tm = av_rescale_q(tm, AV_TIME_BASE_Q, gFormatCtx->streams[gVideoStreamIdx]->time_base);
if(avformat_seek_file(gFormatCtx, gVideoStreamIdx, 0, tm, tm, 0)<0){
INFO("av_seek_frame error");
}else{
INFO("av_seek_frame success");
avcodec_flush_buffers(gVideoCodecCtx);
}

전에 조언받은대로 av_seek_frame대신 avformat_seek_file을 사용했습니다. 그런데 궁금한게 저는 썸네일을 1초짜리 동영상이라면

0.1초 단위로 보여주려고 하는데요. 저기있는 pos값을 0.1단위로 고쳐서 이동시켜보아도 계속 같은 자리의 동영상만 나옵니다;

gFrame->best_effort_timestamp 이렇게 현재 프레임 위치를 조회해봐도 변하질 않네요??? avformat_seek_file에서 min값을

0으로 줬는데도 작은값으로 이동하는건 왜일까요ㅡㅡ?? 동영상으로 치면 계속 0.1초값에 머물러 있네요.