Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed #2057
  • Loading branch information
jeanlf committed Jan 21, 2022
1 parent ebedc7a commit b13e998
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/bifs/memory_decoder.c
Expand Up @@ -936,7 +936,12 @@ GF_Err gf_bifs_flush_command_list(GF_BifsDecoder *codec)
GF_Err e;
CommandBufferItem *cbi;
GF_SceneGraph *prev_root = codec->current_graph;
M_QuantizationParameter *prev_qp = codec->ActiveQP;
u32 prev_qp_count = gf_list_count(codec->QPs);
u32 NbPass = gf_list_count(codec->command_buffers);


codec->ActiveQP = NULL;
GF_List *nextPass = gf_list_new();
while (NbPass) {
while (gf_list_count(codec->command_buffers)) {
Expand Down Expand Up @@ -987,10 +992,17 @@ GF_Err gf_bifs_flush_command_list(GF_BifsDecoder *codec)
}
NbPass --;
if (NbPass > gf_list_count(codec->command_buffers)) NbPass = gf_list_count(codec->command_buffers);

//restore QP state
while (gf_list_count(codec->QPs) > prev_qp_count) {
gf_list_rem(codec->QPs, 0); //QPs are inserted at head of list
}
codec->ActiveQP = NULL;
codec->LastError = GF_OK;
}
gf_list_del(nextPass);
codec->current_graph = prev_root;
codec->ActiveQP = prev_qp;
return GF_OK;
}

Expand Down

0 comments on commit b13e998

Please sign in to comment.