Browse code

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>

Michael Niedermayer authored on 2012/06/03 04:11:43
Showing 1 changed files
... ...
@@ -1207,6 +1207,9 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
1207 1207
              st->parser->pict_type == AV_PICTURE_TYPE_I))
1208 1208
             out_pkt.flags |= AV_PKT_FLAG_KEY;
1209 1209
 
1210
+        if(st->parser->key_frame == -1 && st->parser->pict_type==AV_PICTURE_TYPE_NONE && (pkt->flags&AV_PKT_FLAG_KEY))
1211
+            out_pkt.flags |= AV_PKT_FLAG_KEY;
1212
+
1210 1213
         compute_pkt_fields(s, st, st->parser, &out_pkt);
1211 1214
 
1212 1215
         if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&