changeset 4539:54fded221fb1 libavformat

Add key_frame to AVCodecParserContext, used in libavformat. Initialized to -1 in parser.c for backward compatibility. Patch by Ivan Schreter, schreter gmx net
author cehoyos
date Wed, 18 Feb 2009 23:46:05 +0000
parents 63c5b6f7d3f5
children 5c738a83ac7c
files avformat.h utils.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Wed Feb 18 14:01:46 2009 +0000
+++ b/avformat.h	Wed Feb 18 23:46:05 2009 +0000
@@ -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, \
--- a/utils.c	Wed Feb 18 14:01:46 2009 +0000
+++ b/utils.c	Wed Feb 18 23:46:05 2009 +0000
@@ -904,8 +904,10 @@
     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;
     }
 }