Answering my own message the second time because Win10 default mail client
cut off my text.

 

After some more digging I found out that my videos in question have
incorrect starting AVFrame.pkt_dts coded

and start at around 0.5 seconds. Which explains my 13 frame discrepancy when
calculating current_frame.

 

I now have a frame_offset that I calculate if I detect this discrepancy with


frame_offset = (pFrame->pkt_dts/pFrame->pkt_duration);

 

But is this really the best way to do that?

 

And event with corrected frames, my 

av_seek_frame(ptrFormatCtx_, -1, seekTarget, AVSEEK_FLAG_FRAME  |
AVSEEK_FLAG_BACKWARD); 

 

still won't seek to first I-Frame backward. Is this because of incorrect
pkt_dts that start well into a file?

And also what do I generally do when this happens?

 

_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to