>> + * // seek forward to the next keyframe in this stream >> + * av_seek_frame(ic, pkt.stream_index, pkt.dts, 0); > > wont that seek to the same frame again ? It works in my experience, but I agree that it's ambiguous. Does pkt.dts+AV_TIME_BASE make more sense?