Fixed GOP POC order when not using threads

This commit is contained in:
Marko Viitanen 2015-03-10 14:12:51 +02:00
parent 866c3bfdf1
commit 1527822753

View file

@ -1017,8 +1017,8 @@ void encoder_next_frame(encoder_state_t *state) {
state->global->poc++;
if (state->encoder_control->cfg->gop_len) {
// Calculate POC according to the global frame counter and GOP structure
state->global->poc = state->global->frame -
(state->global->frame % 8) +
state->global->poc = state->global->frame - 1 -
((state->global->frame-1) % 8) +
state->encoder_control->cfg->gop[(state->global->frame - 1) % 8].poc_offset;
}