1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-16 03:44:15 +02:00

h264: don't drop B-frames after next keyframe on POC reset.

The keyframe after a POC reset may not be the first to be returned to
the user. Therefore, don't reset the expected next POC once we return
a keyframe to the user, but once we know that the next frame in the
return-queue is a keyframe.
This commit is contained in:
Ronald S. Bultje 2011-12-12 12:02:58 -08:00
parent b8909cb364
commit 0b4c323213

View File

@ -1530,7 +1530,11 @@ static void decode_postinit(H264Context *h, int setup_finished){
h->next_outputed_poc = INT_MIN;
}
} else {
h->next_outputed_poc = out->poc;
if (out_idx == 0 && pics > 1 && h->delayed_pic[0]->f.key_frame) {
h->next_outputed_poc = INT_MIN;
} else {
h->next_outputed_poc = out->poc;
}
}
h->mmco_reset = 0;
}else{