If the first picture is not IDR, it would have non-zero frame_num but it's not gap. We should skip gap frame handling in that case
If the first picture is not IDR, it would have non-zero frame_num but it's not gap. We should skip gap frame handling in that case