ffmpeg will only assign the correct keyframe flag to the video pkt, which is the one used later to be written to the final file.
Merge pull request #20 from edisonw/master

Key frame detection should be done on video_pkt, not picture.