You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we added more then MAX_REFRENCE_FRAMES frames, _mpeg_bitstream_cea708_emplace_back just increases packet->latent.
Then _mpeg_bitstream_cea708_sort hangs on sort array of MAX_REFRENCE_FRAMES elements. Due to cea708 array wrapping, it sorts ring array where 64's element points to first element.
Will be better to move packet->front before insertion if packet->latent >= MAX_REFRENCE_FRAMES as following:
When we added more then MAX_REFRENCE_FRAMES frames, _mpeg_bitstream_cea708_emplace_back just increases packet->latent.
Then _mpeg_bitstream_cea708_sort hangs on sort array of MAX_REFRENCE_FRAMES elements. Due to cea708 array wrapping, it sorts ring array where 64's element points to first element.
Will be better to move packet->front before insertion if packet->latent >= MAX_REFRENCE_FRAMES as following:
cea708_t* _mpeg_bitstream_cea708_emplace_back(mpeg_bitstream_t* packet, double timestamp)
{
if (packet->latent < MAX_REFRENCE_FRAMES) {
++packet->latent;
} else {
packet->front = (packet->front + 1) % MAX_REFRENCE_FRAMES;
}
}
I added patch to fix the issue.
cea708_wrap_around.patch
The text was updated successfully, but these errors were encountered: