keyframe is not a keyframe? AV_PKT_FLAG_KEY does not decode to AV_PICTURE_TYPE_I
问题 After decoding a packet containing AV_PKT_FLAG_KEY in the flags, I was expecting to get I-frames, but instead I got P-frames: After a call to: avcodec_decode_video2(codecCtx, frame, &frameFinished, &packet); // mpeg2 video I print out the following as a sanity check: printf("packet flags: %d picture type: %c\n", packet.flags, av_get_picture_type_char(frame->pict_type)); Returns the output: packet flags: 1 picture type: P When I was expecting: packet flags: 1 picture type: I Where '1' == AV