Previously, the index entry was unconditionally marked as a keyframe, which is incorrect for inter-coded video (B/P frames). This patch uses the AV_PKT_FLAG_KEY to correctly flag keyframes. Please find the patch attached.