<div dir="ltr">
<div>Hi libav people,</div><div><br></div><div>I've been getting to know
 libav lately for a specific project regarding studying frame-by-frame 
animation, with my goal for libav being to produce JPG images from a 
video using multiple CPU threads.</div><div><br></div><div>Right now, 
I'm studying various example code and scrubbing through the 
documentation to make experimental minimal code that does what I need. <br></div><div><br></div><div>I managed to output a specific range of frames as ".PGM" files, but now I want to utilize "<a href="https://ffmpeg.org/doxygen/trunk/group__lavf__decoding.html#gaa23f7619d8d4ea0857065d9979c75ac8">av_seek_frame</a>"
 to start closer to the first frame in my target range (as far as I know
av_seek_frame results in the decoder being placed at the nearest "keyframe" before the target "frame" - with the frame being dependent upon the keyframe).</div><div></div><div></div><div><br></div><div>However, "av_seek_frame" does not behave as I expect it to, and I can 
find no examples of its usage in context online. I imagine I'm using it 
incorrectly.</div><div>"av_seek_frame" always returns 0 (a success code)
 and the decoder's current frame remains at whatever it was before 
calling "av_seek_frame". It's as if 
av_seek_frame is doing nothing, which makes me think my usage is 
incorrect. 

</div><div><br></div><div>I attached my current code experimentation as "seek_test.cpp"</div><div>and the video I'm testing with is located here: <a href="https://drive.google.com/file/d/1xSiGioMSEE2iEt0eVzniZE2HHUP-g16l/view">https://drive.google.com/file/d/1xSiGioMSEE2iEt0eVzniZE2HHUP-g16l/view</a></div><div>(I also tried other videos for testing, but they had the same issue.)</div><div><br></div><div>I've
 been at it for a few hours and I'd love if someone experienced could 
tell me what I'm doing wrong to have av_seek_frame not behave as 
expected :) I have much to learn.<br></div><div><br></div><div>- Ash</div>

</div>