aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-02 21:11:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-07 00:55:25 +0200
commitd0cb4dc471aee0d0325659755cece19db593b450 (patch)
treec1c97c8ff4656cc044a325d3e7a207aaabcc499f
parent95b1cbc4cb86d839cc827f083af9491cec1703c1 (diff)
downloadffmpeg-d0cb4dc471aee0d0325659755cece19db593b450.tar.gz
lavf: use input keyframe flag when muxer does not provide keyframe flags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 5665674b55a45df757ed4fcd076a5cdf9ab484b6) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e7fd04abe8..ca97b91511 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) &&