diff options
author | Ivan Schreter <schreter@gmx.net> | 2009-02-18 23:46:05 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2009-02-18 23:46:05 +0000 |
commit | 6363af44da7471ba8f67ce8204b3b853a7d3cb30 (patch) | |
tree | 4fbdd61244fde1bab378d5eabf4807a23d75d7d9 /libavformat/utils.c | |
parent | 2ea89d9274bf27419239c05182c23d30c402cb22 (diff) | |
download | ffmpeg-6363af44da7471ba8f67ce8204b3b853a7d3cb30.tar.gz |
Add key_frame to AVCodecParserContext, used in libavformat.
Initialized to -1 in parser.c for backward compatibility.
Patch by Ivan Schreter, schreter gmx net
Originally committed as revision 17442 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index d2e141a5af..2d66dced35 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -904,8 +904,10 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, else if (pc) { pkt->flags = 0; /* keyframe computation */ - if (pc->pict_type == FF_I_TYPE) - pkt->flags |= PKT_FLAG_KEY; + if (pc->key_frame == 1) + pkt->flags |= PKT_FLAG_KEY; + else if (pc->key_frame == -1 && pc->pict_type == FF_I_TYPE) + pkt->flags |= PKT_FLAG_KEY; } } |