diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-02 21:11:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-02 21:11:43 +0200 |
commit | 5665674b55a45df757ed4fcd076a5cdf9ab484b6 (patch) | |
tree | c3f76c68865adc64c331327add795d901f7db3fe /libavformat | |
parent | b3675f890abee0bc446495711223a5c790234672 (diff) | |
download | ffmpeg-streaming-5665674b55a45df757ed4fcd076a5cdf9ab484b6.zip ffmpeg-streaming-5665674b55a45df757ed4fcd076a5cdf9ab484b6.tar.gz |
lavf: use input keyframe flag when muxer does not provide keyframe flags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) && |