[FFmpeg-cvslog] lavf: use input keyframe flag when muxer does not provide keyframe flags.

Michael Niedermayer git at videolan.org
Thu Jun 7 01:44:21 CEST 2012


ffmpeg | branch: release/0.11 | Michael Niedermayer <michaelni at gmx.at> | Sat Jun  2 21:11:43 2012 +0200| [d0cb4dc471aee0d0325659755cece19db593b450] | committer: Michael Niedermayer

lavf: use input keyframe flag when muxer does not provide keyframe flags.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 5665674b55a45df757ed4fcd076a5cdf9ab484b6)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0cb4dc471aee0d0325659755cece19db593b450
---

 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index e7fd04a..ca97b91 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1207,6 +1207,9 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
              st->parser->pict_type == AV_PICTURE_TYPE_I))
             out_pkt.flags |= AV_PKT_FLAG_KEY;
 
+        if(st->parser->key_frame == -1 && st->parser->pict_type==AV_PICTURE_TYPE_NONE && (pkt->flags&AV_PKT_FLAG_KEY))
+            out_pkt.flags |= AV_PKT_FLAG_KEY;
+
         compute_pkt_fields(s, st, st->parser, &out_pkt);
 
         if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&



More information about the ffmpeg-cvslog mailing list