Commit 5a6e7771 authored by Michael Niedermayer's avatar Michael Niedermayer

h264: dont set key_frame when the frame is not a real keyframe.

Fixes Ticket514
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 530cd7a9
...@@ -1441,7 +1441,7 @@ static void decode_postinit(H264Context *h, int setup_finished){ ...@@ -1441,7 +1441,7 @@ static void decode_postinit(H264Context *h, int setup_finished){
} }
if (h->next_output_pic && h->next_output_pic->sync) { if (h->next_output_pic && h->next_output_pic->sync) {
h->sync |= 2*!!h->next_output_pic->f.key_frame; h->sync |= 2;
} }
if (setup_finished) if (setup_finished)
...@@ -3731,7 +3731,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ ...@@ -3731,7 +3731,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
(hx->nal_unit_type == NAL_IDR_SLICE); (hx->nal_unit_type == NAL_IDR_SLICE);
if (h->recovery_frame == h->frame_num) { if (h->recovery_frame == h->frame_num) {
s->current_picture_ptr->f.key_frame |= 1; h->sync |= 1;
h->recovery_frame = -1; h->recovery_frame = -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment