diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-26 15:46:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-26 15:56:11 +0200 |
commit | e0b2bdd37a019360117528dc08e8d16e8d83c08b (patch) | |
tree | 9110b8b142fe601667750c9f964a800cf33a0112 /libavcodec/h264_parser.c | |
parent | 41efb8d9a75fc302a5f204e8ef22f103b2181fd8 (diff) | |
download | ffmpeg-e0b2bdd37a019360117528dc08e8d16e8d83c08b.tar.gz |
avcodec/h264_parser: heuristically detect non marked keyframes
Fixes Ticket3083
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 4e29f5cbd5..0c426ddabc 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -309,6 +309,9 @@ static inline int parse_nal_units(AVCodecParserContext *s, h->sps = *h->sps_buffers[h->pps.sps_id]; h->frame_num = get_bits(&h->gb, h->sps.log2_max_frame_num); + if(h->sps.ref_frame_count <= 1 && h->pps.ref_count[0] <= 1 && s->pict_type == AV_PICTURE_TYPE_I) + s->key_frame = 1; + avctx->profile = ff_h264_get_profile(&h->sps); avctx->level = h->sps.level_idc; |