summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorIvan Schreter <schreter@gmx.net>2009-02-18 23:46:05 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-02-18 23:46:05 +0000
commit6363af44da7471ba8f67ce8204b3b853a7d3cb30 (patch)
tree4fbdd61244fde1bab378d5eabf4807a23d75d7d9 /libavformat
parent2ea89d9274bf27419239c05182c23d30c402cb22 (diff)
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')
-rw-r--r--libavformat/avformat.h2
-rw-r--r--libavformat/utils.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3640808765..561e367a31 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -23,7 +23,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 52
#define LIBAVFORMAT_VERSION_MINOR 29
-#define LIBAVFORMAT_VERSION_MICRO 0
+#define LIBAVFORMAT_VERSION_MICRO 1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
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;
}
}