id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
2074,decoded frame picture type does not match packet flags,mrhines,,"Summary of the bug:

I'm routine decoding an MPEG2 video, like this:

    avcodec_decode_video2(codecCtx, frame, &got_frame, &packet)

.. and upon encountering a key frame, I perform a sanity check, like this:

    if(got_frame && (packet.flags & AV_PKT_FLAG_KEY))
         printf(""picture type: '%c'\n"", av_get_picture_type_char(frame->pict_type));

.. which prints out:

         picture type 'P'

Perhaps my layman's understanding of video is wrong, but doesn't ""key frame"" == 'I' frame? Is this output valid?

Confirming with: 
         ffprobe -show_frames sample.mpg

Shows:
         [FRAME]
             ... snip ...
         key_frame=1
             ... snip ...
         pict_type=I
             ... snip ...
         [/FRAME]

Am I missing something?

How to reproduce:
{{{
% run avcodec_decode_video2() for a while until you hit a keyframe packet and then perform the sanity check
ffmpeg version 1.0 (also confirmed on trunk with 'git checkout master'
built on Ubuntu Linux 12.04
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.",defect,closed,normal,avcodec,git-master,invalid,mpeg2video,,,,0,0
